Author Topic: Segmentation Fault on install in FC5  (Read 5503 times)

zours

  • Wayfarer
  • *
  • Posts: 8
    • View Profile
(No subject)
« Reply #15 on: April 18, 2006, 11:18:42 pm »
OK... But as a rule I always deactivate everything related to SELinux, it causes nothing but trouble with me.

So I guess what you said doesn\'t apply ?

sardit

  • Hydlaa Resident
  • *
  • Posts: 73
    • View Profile
(No subject)
« Reply #16 on: April 18, 2006, 11:33:20 pm »
the chcon command does. that enables gl when its disabled ( try glxgears, it should crash on you right now )

zours

  • Wayfarer
  • *
  • Posts: 8
    • View Profile
(No subject)
« Reply #17 on: April 18, 2006, 11:38:25 pm »
Nope. glxgears works fine ;-)
The problems I have with emulators and PlaneShift is not that easy to solve, I\'m afraid.
« Last Edit: April 18, 2006, 11:39:22 pm by zours »

Justice

  • Wayfarer
  • *
  • Posts: 4
    • View Profile
Workaround for FC5
« Reply #18 on: April 18, 2006, 11:51:57 pm »
Depending on how desperate you are to get Planeshift working on FC5, you can do what I did.  I have a VMWare virtual machine with Ubuntu (Breezy) on it, and I just downloaded and ran the installer in Ubuntu to get the files out of the installer, and then copied the files over to the FC5 host again.  The game runs fine, so it seems that this problem is specific to the installer only.  This solution isn\'t the most straightforward, but hey, it works. :-)

I should also mention that you don\'t need to buy VMWare Workstation to do this.  Just download the free VMWare Player (http://www.vmware.com/products/player/), and the free Browser Appliance, which is just a minimal Ubuntu install (http://www.vmware.com/vmtn/appliances/browserapp.html).  Or if you want the ability to install any OS you want, check out this How-to: http://www.hackaday.com/entry/1234000153064739/
« Last Edit: April 19, 2006, 06:13:08 am by Justice »

zours

  • Wayfarer
  • *
  • Posts: 8
    • View Profile
(No subject)
« Reply #19 on: April 18, 2006, 11:59:56 pm »
Yeah there are always this kind of workarounds... Maybe Wine could do the trick too...

But I\'m more interested in the real reasons of the bug, since it also affects other programs I\'d like to see running :-(

sardit

  • Hydlaa Resident
  • *
  • Posts: 73
    • View Profile
(No subject)
« Reply #20 on: April 19, 2006, 01:39:39 am »
sick, but hey, ill just give it a try, perhaps that will work for me, cause right now im getting very frustrated by the cvs, its perfectely working, but it keeps crashing in the hydlaa_plazaa map...

hmm it fails to run the config

where can i find the kernel source it needs to build the module?

the directory i think they should be in

/usr/src/kernels/2.6.16_2080_FC5-i686/include

does not work, it complains about different memory sizes?

what did you use?
« Last Edit: April 19, 2006, 02:59:36 am by sardit »

zours

  • Wayfarer
  • *
  • Posts: 8
    • View Profile
(No subject)
« Reply #21 on: April 19, 2006, 04:38:53 am »
Did you even install it ? By default, Fedora does not ship with kernel sources.

urkle

  • Wayfarer
  • *
  • Posts: 4
    • View Profile
(No subject)
« Reply #22 on: April 19, 2006, 05:25:30 am »
Quote
Originally posted by sardit
gl accelleration does not work with the latest livna driver

type as root

chcon -t texrel_shlib_t /usr/lib/xorg/modules/extensions/nvidia/*.so

and enable in ( start / administration / security level and firewall )

under the tab selinux set permissive click modify policy in the section compatibility cross the box at allow the use of shared librarys with text relocation

it enables the gl again ( well first thing does that the second helps with apps that need that particular strategy with text relocation )

Livna posts that they will fix the selinux issue asap and that they will make sure the next nvidia driver doesnt have that problem but that will have to wait till the next kernel upgrade.


I\'ve had no problems running any opengl applications on FC5 w/ selinux enabled or set in permissive mode.  However, the planeshift installation issue is NOT related to GL as the installer does not use opengl.. and crashes right after the ld-loader tried to LOAD the binary.

Output from running strace ./PlaneShift_CBV0.3.014b.bin

execve(\"./PlaneShift_CBV0.3.014b.bin\", [\"./PlaneShift_CBV0.3.014b.bin\"], [/* 38 vars */]) = 0
old_mmap(0x1000000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, 0, 0) = 0x1000000
old_mmap(0x8048000, 999424, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, 0, 0) = 0x8048000
munmap(0x8120000, 114688)               = 0
old_mmap(0x8048000, 883086, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, 17158829, 0) = 0x8048000
mprotect(0x8048000, 883083, PROT_READ|PROT_EXEC) = 0
old_mmap(0x8120000, 109555, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, 17158829, 0xd7000) = 0x8120000
mprotect(0x8120000, 109552, PROT_READ|PROT_WRITE) = 0
old_mmap(0x813b000, 2416, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, 0, 0) = 0x813b000
brk(0x813c000)                          = 0x813c000
open(\"/lib/ld-linux.so.2\", O_RDONLY)    = 4
read(4, \"\\177ELF\\1\\1\\1\\0\\0\\0\\0\\0\\0\\0\\0\\0\\3\\0\\3\\0\\1\\0\\0\\0@\\10\\0\\000\"..., 512) = 512
old_mmap(NULL, 110592, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0x219000
munmap(0x232000, 8192)                  = 0
old_mmap(0x219000, 99268, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0) = 0x219000
mprotect(0x219000, 99268, PROT_READ|PROT_EXEC) = 0
old_mmap(0x232000, 5624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0x18000) = 0x232000
mprotect(0x232000, 5624, PROT_READ|PROT_WRITE) = 0
close(4)                                = 0
munmap(0x1000000, 385024)               = 0
brk(0)                                  = 0x813c000
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++

urkle

  • Wayfarer
  • *
  • Posts: 4
    • View Profile
Another Evil way to get it installed/cause of problem.
« Reply #23 on: April 19, 2006, 05:42:49 am »
I think I found the cause of the problem..  I believe it\'s the ld-loader. (ld-linux.so) from glibc 2.4

What I did to get this to install. was install qemu from extras and download the qemu-gnemul-0.5.3.tar.gz from qemu\'s website.

http://fabrice.bellard.free.fr/qemu/qemu-gnemul-0.5.3.tar.gz

then extracted that into a temp directory (/home/urkle/qemu) and ran the following

qemu-i386 -L /home/urkle/qemu/usr/local/gnemul/qemu-i386/ ./PlaneShift_CBV0.3.014b.bin

and it runs.. albiet emulated through qemu via an older ld-linux and glibc. (2.1.3)

Justice

  • Wayfarer
  • *
  • Posts: 4
    • View Profile
(No subject)
« Reply #24 on: April 19, 2006, 06:04:56 am »
Sardit:  It sounds like Urkle\'s workaround would be easier than the vmware method, but in case you still wanted to know how to install the vmware player on FC5:

1.  Make sure you have the kernel-devel package installed for your running kernel.
2. You\'ll need to use this vmware patch: http://ftp.cvut.cz/vmware/vmware-any-any-update101.tar.gz
 
It is really easy to use, you just extract it and run the runme.pl script, and let it do its magic.  I should have mentioned this FC5 requirement initially, but honestly I had forgotten all about it.

Urkle:  Smart thinking to use qemu, wish I\'d thought of that!
« Last Edit: April 19, 2006, 06:09:54 am by Justice »

zours

  • Wayfarer
  • *
  • Posts: 8
    • View Profile
(No subject)
« Reply #25 on: April 19, 2006, 01:45:23 pm »
Hum... So that would be glibc that is causing all these problems to me... Yeah, that could be it. Thanks for pointing it out :-)

Wired_Crawler

  • Hydlaa Citizen
  • *
  • Posts: 429
    • View Profile
Solution
« Reply #26 on: April 19, 2006, 01:48:20 pm »
You are right, it is kernel related problem. The installer is UPX-packed executable and it needs permission to execute code stored in stack area.

As root use command:

sysctl kernel.exec-shield=1

(I think echo \"1\" > /proc/sys/kernel/exec-shield would work too)

then run Planeshift installer.

Default value for FC5 (kernel 2.6.16) is 11 and I\'m not sure if it is not a kind of bug (which increases security).

If You want the change to be permanent give option \"-w\" to sysctl or add the line

kernel.exec-shield = 1

to /etc/sysctl.conf

Tested on Bitrock InstallBuilder installer, which was behaving the same way (I had no time to download PS installer).
"Close the world, txEn eht nepO."

zours

  • Wayfarer
  • *
  • Posts: 8
    • View Profile
(No subject)
« Reply #27 on: April 19, 2006, 02:23:45 pm »
THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS !!!!!!!!!!!!!!!!!!!!!!!!!

Not only did it solve the Planeshift installer problem, but also every other problem I had with various emulators.

So once again :
THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS !!!!!!!!!!!!!!!!!!!!!!!!!

I\'m maybe a bit too enthusiastic, but I searched an answer for my problem for a long time and couldn\'t find anything, so you can imagine how much I\'m relieved now :-)

Just to satisfy my curiosity, how did you find out ?

Wired_Crawler

  • Hydlaa Citizen
  • *
  • Posts: 429
    • View Profile
(No subject)
« Reply #28 on: April 19, 2006, 03:01:43 pm »
Quote
Just to satisfy my curiosity, how did you find out ?
It comes from the experience - after many years of using computers special kind of intuition develops in your mind, and you just get the ideas \"out of nowhere\" ;). Feed the brain with enough amount of data (like \"exec\", \"kernel\", \"segmentation fault\", \"selinux\", \"permission\", \"execstack\", \"sysctl\", \"upx\", \"this works, that does not\", \"on this system this works, on that does not\" etc, etc., search google for some ot those terms and get some more) and you will receive the result, sometimes it happens suddenly, when you don\'t even think about  it... Do You remember mentats form \"Dune\" ? Who knows, maybe it is possible, that evolution of human brain will allow training of human computers in the future...
"Close the world, txEn eht nepO."

sardit

  • Hydlaa Resident
  • *
  • Posts: 73
    • View Profile
(No subject)
« Reply #29 on: April 19, 2006, 03:42:58 pm »
Finally something that worked !

thanks a lot Wired