Thread Building Blocks problem?


#1

I have been trying to get openCV running on the latest builds. I keep crashing in libgomp when trying to start OpenCV.

Steps to recreate the issue are at https://GitHub.com/lawrencek52/FirstRobotics.git.

Basically when you attempt to start the ball_tracker.py in the Vision sub directory it core dumps in libgomp.


#2

Is there anyway you can get and share a backtrace from the core dump?


#3

It’s not actually generating a core file, Python politely traps the problem and generates a nice error message. So I did a little research on how to get a core dump or debug python with gdb, here is a useful intro: https://wiki.python.org/moin/DebuggingWithGdb Unfortunately I wasn’t able to successfully hit a breakpoint at any of the entries to libgomp.

Fortunately I found this discussion https://github.com/pytorch/pytorch/issues/2083 and by changing the order of importing in python the problem goes away. The code used to work with the original order of import, but now it doesn’t, strange.


#4

Interesting… and sufficiently esoteric that I’ve not come
across this before.

Did you come across the similar thread about when matlab experiences
the same errors?

Certainly if the loading order of libraries affects things, and a
carefully crafted LD_PRELOAD can workaround them, then this is
certainly the sort of problem could come and go with relatively
small changes to the components (it would only take one of the
components eliminating a library dependency to disturb things).

I’d be interested to know if the LD_PRELOAD trick works for you. If
nothing else if would be a useful trick have in the back pocket for
the future since I think it could be possible (when importing two
big frameworks that have few cross-dependencies) for no ordering
of the import lines to be loadable.