Opened 9 years ago

Closed 5 years ago

#6606 closed bug (fixed)

QEMU (on Haiku) doesn't work anymore

Reported by: aldeck Owned by: nobody
Priority: normal Milestone: R1
Component: - General Version: R1/Development
Keywords: Cc: zooey, mmlr, umccullough
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

QEMU (on Haiku) won't run an haiku image i just built (and tested ok with qemu on a linux box). It used to work flawlessly on a mid july rev.

It fails with the following output on stdout:

Abort
Killed (by death)

No userland crash or kdl, nothing in the syslog either.

Haiku hrev38635, qemu 0.11.1 from http://www.bebits.com/app/4208

Change History (12)

comment:1 Changed 9 years ago by aldeck

I narrowed it between hrev38152 (OK) and hrev38209 (Not OK) using prebuilt images. I will now use sources to get further.

comment:2 Changed 9 years ago by aldeck

Cc: zooey added

hrev38162 should be the culprit!

hrev38161 OK, hrev38162 (lots of changes but doesn't build due to time preflet missing localtime.h), hrev38163 Not OK

Note that qemu runs apparently normally (up to qemu POST) when called without an image.

Last edited 9 years ago by aldeck (previous) (diff)

comment:3 Changed 9 years ago by aldeck

Cc: mmlr added

Michael might have an idea too :) Btw Michael, could you provide the sources of your qemu port? Or even nicer would be to publish your patch(es) on haiku-ports. Regards.

comment:4 Changed 9 years ago by zooey

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

comment:5 Changed 9 years ago by zooey

The problem is that qemu relies on being able to enlarge one of the three areas it has created. That used to work, but with the adjustments that were done to libroot, more areas are being created (caused by the dynamic loading of libroot-addon-icu.so) immediately following the qemu-areas. So when qemu tries to resize one of its own areas, it can't and then aborts.

Without having the qemu source, I can only speculate on why qemu doesn't create the area with the correct size right from the start. If that can't be done, another possibility would be to trigger loading of libroot-addon-icu.so (e.g. by invoking tzset()) before creating its own areas.

comment:6 in reply to:  5 ; Changed 9 years ago by bonefish

Replying to zooey:

Without having the qemu source, I can only speculate on why qemu doesn't create the area with the correct size right from the start. If that can't be done, another possibility would be to trigger loading of libroot-addon-icu.so (e.g. by invoking tzset()) before creating its own areas.

That theory can be easily tested without modifying qemu. Just write a mini-library that invokes tzset() in its static initialization and add it to LD_PRELOAD when starting qemu.

comment:7 in reply to:  6 Changed 9 years ago by zooey

Replying to bonefish:

Replying to zooey:

Without having the qemu source, I can only speculate on why qemu doesn't create the area with the correct size right from the start. If that can't be done, another possibility would be to trigger loading of libroot-addon-icu.so (e.g. by invoking tzset()) before creating its own areas.

That theory can be easily tested without modifying qemu. Just write a mini-library that invokes tzset() in its static initialization and add it to LD_PRELOAD when starting qemu.

Yep, I already tested with LD_PRELOAD=libroot-addon-icu.so and that works. So we should be able to fix the issue in qemu easily, one way or the other. I'd rather refrain from hacking around the problem by changing how libroot loads its addon.

comment:8 Changed 9 years ago by tonestone57

Michael posted a link to his QEMU 10.4 diff in the mailing list post below:

http://www.freelists.org/post/haiku-development/Adding-some-new-OptionalPackages,7

That should allow someone to get QEMU working on Haiku once more.

comment:9 Changed 9 years ago by umccullough

Cc: umccullough added

comment:10 Changed 9 years ago by umccullough

In addition to the "Abort Killed (by death)" issue, QEMU also links to the libssl.so.0.9.8 and libcrypto.so.0.9.8 which are no longer included with Haiku. Haiku's SSL has been updated to 1.0.0 now and I had to create symlinks for the older lib versions in order to get it working.

That was when I hit the bigger problem and discovered this was a known-issue. :(

comment:11 Changed 7 years ago by zooey

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

comment:12 Changed 5 years ago by pulkomandy

Resolution: fixed
Status: assignedclosed

Current qemu package does not crash anymore.

Note: See TracTickets for help on using tickets.