This relates to running a java application (IntelliJ java IDE) on a system originally built using fedora7-test4. Oddly enough I had no problems in the original installs. However, either during the update to fedora7-ga or since then, I am no longer able to run this application. This is using the sun jdk, not gcj. I am pretty new to Linux and Fedora, so based on the advice of someone more knowledgeable I ran the following commands, and based on the results he suggested I open a case as it seemed "that glibc is screwed up". Below are the results: [steve@localhost bin]$ gdb --args /usr/java/jdk1.5.0_11/bin/java -Xms64m -Xmx256m -XX:MaxPermSize=99m -ea -Xbootclasspath/p:../lib/boot.jar com.intellij.idea.Main GNU gdb Red Hat Linux (6.6-8.fc7rh) Copyright (C) 2006 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-redhat-linux-gnu"... (no debugging symbols found) Using host libthread_db library "/lib/libthread_db.so.1". (gdb) run Starting program: /usr/java/jdk1.5.0_11/bin/java -Xms64m -Xmx256m -XX:MaxPermSize=99m -ea -Xbootclasspath/p:../lib/boot.jar com.intellij.idea.Main (no debugging symbols found) (no debugging symbols found) Program received signal SIGSEGV, Segmentation fault. 0x4d16ac07 in memset () from /lib/ld-linux.so.2 (gdb) bt #0 0x4d16ac07 in memset () from /lib/ld-linux.so.2 #1 0x4d15b6df in _dl_map_object_from_fd () from /lib/ld-linux.so.2 #2 0x4d15d33c in _dl_map_object () from /lib/ld-linux.so.2 #3 0x4d1611c6 in openaux () from /lib/ld-linux.so.2 #4 0x4d162ec6 in _dl_catch_error () from /lib/ld-linux.so.2 #5 0x4d161785 in _dl_map_object_deps () from /lib/ld-linux.so.2 #6 0x4d15840d in dl_main () from /lib/ld-linux.so.2 #7 0x4d168f6b in _dl_sysdep_start () from /lib/ld-linux.so.2 #8 0x4d1562b8 in _dl_start () from /lib/ld-linux.so.2 #9 0x4d155817 in _start () from /lib/ld-linux.so.2 (gdb) Further, he suggested running `dmesg` and including its output here. Unfortunately, that just gives me the following over and over and over again: bcm43xx: Error: Microcode "bcm43xx_microcode5.fw" not available or load failed. bcm43xx: core_up for active 802.11 core failed (-2) This is a laptop currently with a broadcom card, which I've obviously had wfi issues with.
When you see SIGSEGV in gdb, in addition to bt please issue also info regs and in a different shell run cat /proc/`pidof java`/maps Also, running the program under strace instead of gdb and attaching strace output would be helpful.
(gdb) info reqs Undefined info command: "reqs". Try "help info". (gdb) info regs Undefined info command: "regs". Try "help info". (gdb) regs Undefined command: "regs". Try "help". (gdb) info "info" must be followed by the name of an info command. List of info subcommands: info address -- Describe where symbol SYM is stored info all-registers -- List of all registers and their contents info args -- Argument variables of current stack frame info auxv -- Display the inferior's auxiliary vector info breakpoints -- Status of user-settable breakpoints info catch -- Exceptions that can be caught in the current stack frame info checkpoints -- IDs of currently known forks/checkpoints info classes -- All Objective-C classes info common -- Print out the values contained in a Fortran COMMON block info copying -- Conditions for redistributing copies of GDB info dcache -- Print information on the dcache performance info display -- Expressions to display when program stops info extensions -- All filename extensions associated with a source language info files -- Names of targets and files being debugged info float -- Print the status of the floating point unit info forks -- IDs of currently known forks/checkpoints info frame -- All about selected stack frame info functions -- All function names info handle -- What debugger does when program gets various signals info line -- Core addresses of the code for a source line info linkmap -- Display the inferior's linkmap ---Type <return> to continue, or q <return> to quit--- Are you sure it should be `info regs`?
[steve@localhost ~]$ cat /proc/`pidof java`/maps bash: pidof: command not found cat: /proc//maps: No such file or directory
Created attachment 156202 [details] requested strace output Attaching the output of strace. As I mentioned I am a Linux/Fedora noob, so I "believe" I got the command right. The command I ran is: strace -o /home/steve/Desktop/strace.txt /usr/java/jdk1.5.0_11/bin/java -Xms64m -Xmx256m -XX:MaxPermSize=99m -ea -Xbootclasspath/p:../lib/boot.jar com.intellij.idea.Main
Sorry, typo, info reg Use /sbin/pidof if you don't have /sbin in your PATH. Anyway, from strace the following looks wrong mmap2(0x4d540000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13) = 0x110000 With MAP_FIXED, kernel must honor the address or the syscall must fail, but in this case succeeded with a different address. That would be a kernel bug. What kernel are you using?
Whatever "system update" told me to use ;) Actually I just got a new update last night as well with no improvement. As for the specific version, how do I tell?
uname -a
[steve@localhost ~]$ uname -a Linux localhost.localdomain 2.6.21-1.3200.fc8 #1 SMP Sat Jun 2 05:42:16 EDT 2007 i686 i686 i386 GNU/Linux
ok, I think I see what's wrong with the MAP_FIXED code. I've got a patch, I just want Ingo to take a look at it before I commit it, as it touches execshield.
*** Bug 242749 has been marked as a duplicate of this bug. ***
Can you try the 3218 kernel from http://people.redhat.com/davej/kernels/Fedora/fc7 That should have fixed MAP_FIXED behaviour.
Works for me: execve("/usr/bin/vmware-ping", ["vmware-ping", "-q", "192.168.1.1"], [/* 20 vars */]) = 0 brk(0) = 0x9a79000 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=78336, ...}) = 0 mmap2(NULL, 78336, PROT_READ, MAP_PRIVATE, 3, 0) = 0x111000 close(3) = 0 open("/lib/libc.so.6", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320\20"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=1673760, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x125000 mmap2(0x45efb000, 1390032, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x45efb000 mmap2(0x46049000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14e) = 0x46049000 mmap2(0x4604c000, 9680, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4604c000 close(3) = 0 Fails with 2.6.21-1.3209.fc8PAE
Works in 2.6.21-1.3213.fc8PAE too.