Another startup crash at GlobalError::PushToStack() () from */libapt-pkg.so.5.0

Asked by Jérôme Duriez

Hi,

It seems I'm facing a similar issue than [*]. Here, it's about a local source code that I wrote during the late Python 2-era, and which I'm now trying to re-import into a more recent (Python 3) version of YADE source code.

Compilation is OK but I get segmentation fault launching YADE:

$ ./yade-2020.01aModified
Welcome to Yade 2020.01a # It's a modified version, without my changes everything is OK
Using python version: 3.6.9 (default, Nov 7 2019, 10:44:02)
[GCC 8.3.0]
Segmentation fault (core dumped)

Catchsegv or asan-enabled executables both point (among other things..) to the same error than [*], see e.g., for catchsegv Backtrace:
/usr/lib/x86_64-linux-gnu/libapt-pkg.so.5.0(_ZN11GlobalError11PushToStackEv+0x59)[0x7f3092cd02a9]
/usr/lib/x86_64-linux-gnu/libapt-pkg.so.5.0(_Z13pkgInitConfigR13Configuration+0xf92)[0x7f3092d54082]

Similar to [1] quoted in Anton's post # 4 of [*], I also have both Python2 and Python3 versions of various *boost-python* packages on my machine (all apt-installed).

However, I'm still puzzled in front of the situation (trying -DPYTHON_VERSION=3.6 at cmake did not help for instance ; I also did not really understand Anton's suggestion in [*]), and would appreciate very much if further comments/questions for clarification could be raised to my problem or to [*] ?

[*] https://answers.launchpad.net/yade/+question/684063
[1] https://stackoverflow.com/questions/57064962/boost-python-own-module-throws-segmentation-fault-globalerrorpushtostack

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Jérôme Duriez
Solved:
Last query:
Last reply:
Revision history for this message
Robert Caulk (rcaulk) said :
#1

Hey Jérôme,

>>It's a modified version, without my changes everything is OK

Please indicate to us which files you have modified (and what the changes are) in comparison to the current most recent trunk [1].

Cheers,

Robert

[1]472f4cbb

Revision history for this message
Jérôme Duriez (jduriez) said :
#2

Hi Robert,

It's actually about "22 files changed [half of it are brand new files], 2172 insertions(+), 26 deletions(-)", so I'm afraid exact details will have to wait a proper Merge Request (or several of those...)

Note though I touched for instance py/_utils.cpp, py/utils.py, py/wrapper/customConverters.cpp in case you would advice to start looking therein..

I understand specifics are lacking here, but I'm actually hoping more for a debugging method... Thank you,

Revision history for this message
Robert Caulk (rcaulk) said :
#3

>I'm actually hoping more for a debugging method...

Ok I see. Well I am sure Anton et al. have a better way of doing this, but if I were you I would start by narrowing down which files are causing the problem. I guess I would start by adding file groups one at a time to the newest trunk. Compiling as I add each file group. Once you reach the error, then you know which file group is causing the problem. Then the debugging should be relatively straightforward.

Revision history for this message
Jérôme Duriez (jduriez) said :
#4

A missing "CREATE_LOGGER" in cpp files using LOG_* macros might be a possible reason for this crash or similar ones..

YADE general development is hard to catch up (or even follow) these days ;-)