VirtualBox

Ticket #13038 (closed defect: fixed)

Opened 4 years ago

Last modified 3 years ago

Assertion RT_SUCCESS_RP(rc) failed when Geant4 program runs -> fixed in 4.3 and later releases after 22 Oct 2014

Reported by: itsjareds Owned by:
Priority: major Component: VMM/HWACCM
Version: VirtualBox 4.3.10 Keywords: RT_SUCCESS_NP, thread, memory
Cc: Guest type: other
Host type: other

Description

I compiled Geant4 with parallelism support enabled and tried compiling one of the prepackaged example programs. When I run the compiled program, I get the following output in my terminal in the guest environment:

!!Assertion Failed!!
Expression: RT_SUCCESS_NP(rc)
Location  : /mnt/tinderbox/add-4.3/src/VBox/Runtime/common/misc/thread.cpp(227) void rtThreadLockRW()
VERR_INVALID_HANDLE (-4) - Invalid loader handle.

Neither the host VirtualBox application nor the guest VM crash. I simply get that output in the guest's terminal and the program I attempted to run crashes.

Host: Arch Linux (64-bit) Guest: Scientific Linux 6.5 (64-bit)

Attachments

output.assert.log Download (47.0 KB) - added by itsjareds 4 years ago.
Geant4 program run output
VBox.log Download (122.5 KB) - added by itsjareds 4 years ago.
VirtualBox log file
log.txt Download (20.7 KB) - added by itsjareds 4 years ago.
gdb-output-with-symbols.txt Download (58.5 KB) - added by itsjareds 3 years ago.
GDB output with an additional symbol table loaded from vbox_dri.so
gdb-output-symbols-fixed.txt Download (54.3 KB) - added by itsjareds 3 years ago.

Change History

Changed 4 years ago by itsjareds

Geant4 program run output

Changed 4 years ago by itsjareds

VirtualBox log file

comment:1 Changed 4 years ago by frank

Which pre-packaged application are you talking about? Do I understand it right that the "precompiled package" is linked against the VirtualBox Runtime?

comment:2 Changed 4 years ago by itsjareds

Sorry for the ambiguity. I mean that I have compiled a C++ application (Geant4 modeling application) myself, and when I run the program, I receive the RT_ASSERT_NP(rc) failed message. I believe the bug occurs when the Qt4 window attempts to open. It seems to be related to VirtualBox thread management, so I posted the bug here.

I also have new information that this bug is only occurring with my Arch Linux host. I have an Mac OS X host running the same Scientific Linux 6.5 version, and I am not experiencing issues with the OS X host. My Geant4 program runs successfully on Scientific Linux 6.5 when running under an OS X host, but not with an Arch Linux host.

Arch Linux (buggy host) VirtualBox version: 4.3.10_OSE r93012

Mac OS X (working host) VirtualBox version: 4.3.10 r93012

Last edited 4 years ago by itsjareds (previous) (diff)

comment:3 Changed 4 years ago by frank

Sorry, it's still not 100% clear. Which application aborts with a triggered release assertion? The Geant4 application or VirtualBox?

comment:4 Changed 4 years ago by michael

I would guess that this is a crash in the guest OpenGL libraries. Would it be possible to run the application in a debugger and get a back-trace?

comment:5 Changed 4 years ago by itsjareds

My apologies for the late reply.

@frank: The Geant4 application crashes. It is a C++ program I compiled using g++ in the guest environment. As far as I can tell, it crashes when it attempts to use Qt libraries to open a window. (Still pretty new to Geant4 so I don't know for sure.) In the guest environment, I am using the terminal and type "./exampleB1" to run the program. The program prints out the "Assertion RT_SUCCESS_NP(rc) failed" message and returns control to the terminal. Neither the guest VM nor the host machine crash in any sense; just the program. I have the VirtualBox guest additions installed.

@michael: I will try this when I have access to the right computer and report back.

comment:6 Changed 4 years ago by itsjareds

I managed to run the program in gdb. (Had to install 2 Gb of debuginfo packages!) I will attach the gdb output including the backtrace.

Changed 4 years ago by itsjareds

comment:7 Changed 4 years ago by itsjareds

The problem may instead have to do with threading. I am experiencing the problem when Geant4 tries to create a worker thread in multithreaded mode. The problem does not occur in sequential mode.

comment:8 Changed 4 years ago by niklasson

I have the same issue, and I've tried running Geant4 in sequential mode, and this does help. However, looking through the stacktrace itsjared posted, it seems this is an issue in the visualization feature - more specifically Geant4's opengl driver is calling some function in the virtualbox video driver which causes this error. itsjared - seeing the lack of replies - have you found a fix?

comment:9 Changed 3 years ago by galitsyn

Could you please "add-symbol-file" below into gdb and re-attach "threads apply all bt"? Please note, symbol file is for VBox Additions r93012.

comment:10 Changed 3 years ago by galitsyn

Oh, symbols file is a bit large to be attached here.. Will upload it shortly.

comment:11 follow-up: ↓ 15 Changed 3 years ago by galitsyn

Here is the link to the file.

comment:12 Changed 3 years ago by itsjareds

Thank you for contributing that you are encountering the same problem, niklasson. I was unsure if it was something I was doing wrong or if I discovered a bug. I have not found a fix, but instead just physically installed Xubuntu on my drive and recompiled Geant4 with multithreading support. The problem does not occur in this native solution, only when virtualized in VirtualBox.

Galitsyn, thanks for supplying a symbol file to use. I followed your instructions the best I could, and I will attach the output below.

Changed 3 years ago by itsjareds

GDB output with an additional symbol table loaded from vbox_dri.so

comment:13 Changed 3 years ago by galitsyn

Unfortunately, the backtrace items for the interesting thread (Thread 1) were not resolved. Could you please load symbols file after assertion occurred? Please also make sure you are loading symbols into the correct address (use "info sharedlibrary" to get correct one).

If there will be an issue, you could simply replace /usr/lib64/dri/vboxvideo_dri.so with the file above (do not forget to make a backup of the original one) and the backtrace items should be resolved by default.

comment:14 Changed 3 years ago by itsjareds

Ah, I thought it may have been loaded incorrectly. I ended up just replacing /usr/lib64/dri/vboxvideo_dri.so with your version and got some useful output.

Changed 3 years ago by itsjareds

comment:15 in reply to: ↑ 11 Changed 3 years ago by matkara

Replying to galitsyn:

Here is the link to the file.

Hello,

I have exactly the same problem as the one described in this topic.

Host : XP SP3
Guest : Ubuntu 14.04 LTS
Geant4 : 10.01 beta - Multithreaded mode - qt/opengl activated

The link of the library is dead. Could you send it back please ?

Thank you so much

Last edited 3 years ago by matkara (previous) (diff)

comment:16 Changed 3 years ago by galitsyn

Please specify VBox Guest Additions revision number and I will re-generate this file for you. Please also note that this is issue is still not reproducible here.

comment:17 Changed 3 years ago by matkara

Thank you for your quick answer and your proposal of building the file. This is very kind. I am using : VBOXADDITIONS_4.3.18_96516

To reproduce this issue, you would probably need to compile a recent version of Geant4. This is rather long to do ... if one day, you would like to try, here some information

 http://geant4.web.cern.ch/geant4/support/download_beta.shtml

It would be something like this:

wget http://geant4.cern.ch/support/source/geant4.10.01.b01.tar.gz
tar xvzf geant4.10.01.b01.tar.gz
mkdir build
cd build
cmake ../geant4.10.01.b01 -DGEANT4_USE_QT=ON -DGEANT4_USE_OPENGL_X11=ON -DGEANT4_BUILD_MULTITHREADED=ON

These are the options I am using. At this point, you will need to setup the options for Qt5:

ccmake .

check everything is ok - configure/generate

make

Once Geant4 is compiled, you may test an example:

cd ../geant4.10.01.b01/examples/basic/B1
mkdir build
cd build 
cmake .. -DGeant4_DIR=../../../../../build
make
./exampleB1

EDIT: the paths were corrected

Last edited 3 years ago by matkara (previous) (diff)

comment:18 Changed 3 years ago by michael

So far we have been unable to reproduce this. I build this most recently on a (single VCPU, 64-bit) Ubuntu 14.04 guest with Qt4. Do you always see this assertion? If so, can you also trigger it on a freshly installed guest like I described?

Do you change any options when you run ccmake?

comment:19 Changed 3 years ago by michael

Actually I think I may have reproduced this.

comment:20 Changed 3 years ago by michael

Please give this Additions build a try:

https://www.virtualbox.org/download/testcase/VBoxGuestAdditions_4.3.19-96597.iso

It seems that this was due to an unfortunate combination of Geant4 using an incredibly large amount of thread local storage, glibc putting thread local storage on the thread stack and our 3D code creating a thread with a fixed-size stack.

comment:21 Changed 3 years ago by michael

  • Summary changed from Assertion RT_SUCCESS_RP(rc) failed when Geant4 program runs to Assertion RT_SUCCESS_RP(rc) failed when Geant4 program runs -> fixed in 4.3 and later releases after 22 Oct 2014

I will assume this is fixed.

comment:22 Changed 3 years ago by frank

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in VBox 4.3.20. Please don't forget to update the Guest Additions.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use