Opened 15 years ago

Closed 14 years ago

#5685 closed bug (fixed)

Troubles relocating in VirtualBox Haiku Guest

Reported by: kallisti5 Owned by: nobody
Priority: normal Milestone: R1
Component: System/runtime_loader Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

I've seen this problem off and on for the last few months and finally decided to submit a bug on it.

This bug was spawned by running installoptionalpackages under VirtualBox.

VB settings:   two cpu's
               768MB Memory
               enable IO APIC
runtime_loader: /boot/system/lib/libroot.so: Troubles relocating: Operation not allowed
/bin/installoptionalpacakges: line 296: [: 5: unary operator
(repeat)

The error above was seen while running 'installoptionalpackages -a Vim'

The really strange thing is that 5 minutes later, it worked great without the runtime_loader errors.

Attachments (2)

Screenshot.png (115.7 KB ) - added by kallisti5 15 years ago.
screenshot
haiku-r36263.png (111.6 KB ) - added by kallisti5 15 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 by kallisti5, 15 years ago

almost forgot,

hrev36031 gcc2hybrid

by kallisti5, 15 years ago

Attachment: Screenshot.png added

screenshot

comment:2 by bonefish, 15 years ago

Component: System/runtime_loader- General
Milestone: R1/alpha2R1
Owner: changed from bonefish to nobody
Priority: highnormal

I don't think this is a runtime loader problem. I'd say either some weird/defective executable is invoked, someone is overwriting a library while it is being used, or the kernel messes something up. Hard to guess anything with the available information. I can't reproduce the issue. Please enable kernel tracing for syscalls, teams, and runtime loader. The tracing entries of the failing team would be of interest. You can find the team/thread by checking the runtime loader tracing output, e.g. traced 0 -50 -1 #rld: and then print all tracing entries for that thread (traced 0 -1000 -1 thread <id>). The kernel debugger output should end up in the syslog.

comment:3 by kallisti5, 15 years ago

Weeel, thats pain. I will see if I can reproduce this issue this evening and if I can do as bonefish said.

in the meantime... here is more runtime related errors that randomly croped up...

KERN: runtime_loader: /boot/system/lib/libstdc++.r4.so: Could not resolve symbol '__ti9exception'
KERN: runtime_loader: /boot/system/lib/libstdc++.r4.so: Troubles relocating: Symbol not found
KERN: runtime_loader: /boot/system/add-ons/locale/catalogs/zeta: Could not resolve symbol '__ti13BCatalogAddOn'
KERN: runtime_loader: /boot/system/add-ons/locale/catalogs/zeta: Troubles relocating: Symbol not found

The errors above were all see while running stock Haiku programs (and WebPositive) not sure whats up with the zeta references.

comment:4 by kallisti5, 15 years ago

ok, this is not limited to VirtualBox guests... This was a clean install of the raw gcc2-hybrid image on a Dell OptiPlex GX270

This was the very first command I ran after installation to the hard disk from a usb stick...

Welcome to the Haiku shell.

~> installoptionalpackage -l
Fetching OptionalPackages ...
Fetching OptionalPackageDependencies ...
Fetching OptionalBuildFeatures ...
Generating a list of Package Names ...
...warning: Beam cannot be installed because of DevelopmentMin
...warning: Bluetooth cannot be installed
...warning: Development cannot be installed
...warning: DevelopmentBase cannot be installed
...warning: DevelopmentMin cannot be installed
...warning: ICU-devel cannot be installed because of DevelopmentMin
...warning: LibLayout cannot be installed because of DevelopmentMin
...warning: NetFS cannot be installed because of UserlandFS
...warning: UserlandFS cannot be installed
...warning: Welcome cannot be installed
...warning: WifiFirmwareScriptData cannot be installed


Available Optional Packages:
ABI-compliance-checker APR APR-util BeAE BeBook BeHappy BeOSCompatibility BePDF BeZillaBrowser Bzip CDRecord Clockwerk CLucene CMake Curl CVS Expat Git KeymapSwitcher LibIconv LibXML2 LibXSLT Links MandatoryPackages Mercurial Nano Neon NetSurf OCaml OpenSound OpenSSH OpenSSL P7zip PCRE Pe Perl Python Rsync Sed SQLite Subversion Tar Vim Vision VLC WonderBrush XZ-Utils Yasm
~> installoptionalpackage -a BeZillaBrowser
To be installed:  BeZillaBrowser
Installing BeZillaBrowser-2.0.0.22pre-x86-gcc2-2010-03-14.zip ...
Downloading http://haiku-files.org/files/optional-packages/BeZillaBrowser-2.0.0.22pre-x86-gcc2-2010-03-14.zip ...
2010-04-12 17:41:29 URL:http://haiku-files.org/files/optional-packages/BeZillaBrowser-2.0.0.22pre-x86-gcc2-2010-03-14.zip [12034772/12034772] -> "BeZillaBrowser-2.0.0.22pre-x86-gcc2-2010-03-14.zip" [1]
Extracting BeZillaBrowser-2.0.0.22pre-x86-gcc2-2010-03-14.zip ...
/boot/common/cache/tmp/install-optpkg.sh: line 253: [: =: unary operator expected
~> uname -a
Haiku shredder 1 r36182 Apr 11 2010 18:02:05 BePC Haiku
~> 

Firefox did however install ok.. weird

is the "/bin/installoptionalpacakges: line 296: [: 5: unary operator" line normal behavior?

comment:5 by mmadia, 15 years ago

Owner: changed from nobody to mmadia
Status: newin-progress

Ah, the 'unary operator' is a parsing error in installoptionalpackage, which i'll work on now.

For the curious, this is partial output of parsing jam into bash, the if test for HAIKU_INCLUDE_SOURCES isn't handled correctly.

tmp/install-optpkg.sh:240

if [ "SomeText" != BeZillaBrowser ] ; then
if [ ${TARGET_ARCH} != x86 ] ; then
echo "No optional package BeZillaBrowser available for ${TARGET_ARCH}" ;
elif [ ${HAIKU_GCC_VERSION[1]} -ge 4 ] ; then
InstallOptionalHaikuImagePackage BeZillaBrowser-2.0.0.22pre-x86-gcc4-2010-03-14.zip : ${baseURL}/BeZillaBrowser-2.0.0.22pre-x86-gcc4-2010-03-14.zip : ;
AddSymlinkToHaikuImage home config be Applications : /boot/apps/BeZillaBrowser/BeZillaBrowser ;
if [ ${HAIKU_INCLUDE_SOURCES} = 1 ] ; then
InstallSourceArchive BeZillaBrowser-2010-01-21-src.7z
: http://www.haiku-files.org/files/sources/2010/BeZillaBrowser-2010-01-21-src.7z
fi
else
InstallOptionalHaikuImagePackage BeZillaBrowser-2.0.0.22pre-x86-gcc2-2010-03-14.zip : ${baseURL}/BeZillaBrowser-2.0.0.22pre-x86-gcc2-2010-03-14.zip : ;
AddSymlinkToHaikuImage home config be Applications : /boot/apps/BeZillaBrowser/BeZillaBrowser ;
if [ ${HAIKU_INCLUDE_SOURCES} = 1 ] ; then
InstallSourceArchive BeZillaBrowser-2010-01-21-src.7z
: http://www.haiku-files.org/files/sources/2010/BeZillaBrowser-2010-01-21-src.7z
fi
fi
fi

comment:6 by mmadia, 15 years ago

Owner: changed from mmadia to nobody
Status: in-progressassigned

hrev36204 fixes the unary operator aspect. Giving up ownership as that error shouldn't be related to the relocation errors. Do they still happen?

comment:7 by kallisti5, 15 years ago

Component: - GeneralSystem/runtime_loader

verified that both the the unary operator errors (even after hrev36204) and libroot relocation errors still happen in VirtualBox 3.1.6

see screenshot attached.

by kallisti5, 15 years ago

Attachment: haiku-r36263.png added

comment:8 by mmadia, 15 years ago

To note, kallisti & I had an IRC debugging session. The unary operator errors are from a if [ $integer -eq $nonintegerOrEmptyVariable ] ; . Though, it is not 100% reproducible, which leads us to believe the error being a subtle bug in VBox.

comment:9 by kallisti5, 14 years ago

i think this can be called resolved... Haven't seen this issue on recent nightlies on virtual or real hardware.

comment:10 by mmadia, 14 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.