Bug 312 - socketserver crash
Summary: socketserver crash
Status: RESOLVED FIXED
Alias: None
Product: UPPAAL
Classification: Unclassified
Component: Engine (show other bugs)
Version: 3.6 Beta 2
Hardware: PC Linux
: P1 normal
Assignee: Gerd Behrmann
URL:
Depends on:
Blocks:
 
Reported: 2006-04-12 23:47 CEST by Dawn Rohm
Modified: 2006-04-24 13:56 CEST (History)
0 users

See Also:
Architecture:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dawn Rohm 2006-04-12 23:47:13 CEST
I know that I submitted this problem before, but then it worked.   Previously I believed the problem to have something to do with going through a firewall, but right now I'm running this on machines across the room from one another. Now it doesn't work again.  Whenever I open a model (I'm using the doors example in the demo folder), the socketserver does a segmentation fault and dies.  I'm running the socketserver on a Debian linux machine, and the GUI on Windows XP with the following command: "java -jar uppaal.jar -serverHost 138.74.10.176".  The GUI give the error: "java.io.IOException: Server connection lost".  Below is the output of running strace on the socketserver:

execve("./socketserver", ["./socketserver"], [/* 27 vars */]) = 0
uname({sys="Linux", node="kanga", ...}) = 0
brk(0)                                  = 0x804b478
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40017000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=45739, ...}) = 0
old_mmap(NULL, 45739, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40018000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
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\360^\1"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1244688, ...}) = 0
old_mmap(NULL, 1254852, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40024000
old_mmap(0x4014c000, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x127000) = 0x4014c000
old_mmap(0x40154000, 9668, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40154000
close(3)                                = 0
munmap(0x40018000, 45739)               = 0
brk(0)                                  = 0x804b478
brk(0x806c478)                          = 0x806c478
brk(0)                                  = 0x806c478
brk(0x806d000)                          = 0x806d000
fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40018000
write(1, "UPPAAL Socket Server\n", 21)  = 21
write(1, "Copyright (c) 1995 - 2004, Aalbo"..., 69) = 69
write(1, "All rights reserved.\n", 21)  = 21
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 3
setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
bind(3, {sa_family=AF_INET, sin_port=htons(2350), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
listen(3, 1)                            = 0
getsockname(3, {sa_family=AF_INET, sin_port=htons(2350), sin_addr=inet_addr("0.0.0.0")}, [16]) = 0
write(1, "Listening on port 2350\n", 23) = 23
accept(3, {sa_family=AF_INET, sin_port=htons(3861), sin_addr=inet_addr("138.74.10.196")}, [16]) = 4
socket(PF_FILE, SOCK_STREAM, 0)         = 5
connect(5, {sa_family=AF_FILE, path="/var/run/.nscd_socket"}, 110) = -1 ENOENT (No such file or directory)
close(5)                                = 0
open("/etc/nsswitch.conf", O_RDONLY)    = 5
fstat64(5, {st_mode=S_IFREG|0644, st_size=465, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40019000
read(5, "# /etc/nsswitch.conf\n#\n# Example"..., 4096) = 465
read(5, "", 4096)                       = 0
close(5)                                = 0
munmap(0x40019000, 4096)                = 0
open("/etc/ld.so.cache", O_RDONLY)      = 5
fstat64(5, {st_mode=S_IFREG|0644, st_size=45739, ...}) = 0
old_mmap(NULL, 45739, PROT_READ, MAP_PRIVATE, 5, 0) = 0x40157000
close(5)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libnss_files.so.2", O_RDONLY) = 5
read(5, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\220\35"..., 512) = 512
fstat64(5, {st_mode=S_IFREG|0644, st_size=34520, ...}) = 0
old_mmap(NULL, 33720, PROT_READ|PROT_EXEC, MAP_PRIVATE, 5, 0) = 0x40019000
old_mmap(0x40021000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 5, 0x8000) = 0x40021000
close(5)                                = 0
munmap(0x40157000, 45739)               = 0
gettimeofday({1144877172, 828312}, NULL) = 0
getpid()                                = 2637
open("/etc/resolv.conf", O_RDONLY)      = 5
fstat64(5, {st_mode=S_IFREG|0644, st_size=64, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40022000
read(5, "search snc.edu\nnameserver 138.74"..., 4096) = 64
read(5, "", 4096)                       = 0
close(5)                                = 0
munmap(0x40022000, 4096)                = 0
open("/etc/host.conf", O_RDONLY)        = 5
fstat64(5, {st_mode=S_IFREG|0644, st_size=26, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40022000
read(5, "order hosts,bind\nmulti on\n", 4096) = 26
read(5, "", 4096)                       = 0
close(5)                                = 0
munmap(0x40022000, 4096)                = 0
open("/etc/hosts", O_RDONLY)            = 5
fcntl64(5, F_GETFD)                     = 0
fcntl64(5, F_SETFD, FD_CLOEXEC)         = 0
fstat64(5, {st_mode=S_IFREG|0644, st_size=288, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40022000
read(5, "127.0.0.1\tlocalhost.localdomain\t"..., 4096) = 288
read(5, "", 4096)                       = 0
close(5)                                = 0
munmap(0x40022000, 4096)                = 0
open("/etc/ld.so.cache", O_RDONLY)      = 5
fstat64(5, {st_mode=S_IFREG|0644, st_size=45739, ...}) = 0
old_mmap(NULL, 45739, PROT_READ, MAP_PRIVATE, 5, 0) = 0x40157000
close(5)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libnss_dns.so.2", O_RDONLY)  = 5
read(5, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\260\16"..., 512) = 512
fstat64(5, {st_mode=S_IFREG|0644, st_size=13976, ...}) = 0
old_mmap(NULL, 12704, PROT_READ|PROT_EXEC, MAP_PRIVATE, 5, 0) = 0x40163000
old_mmap(0x40166000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 5, 0x3000) = 0x40166000
close(5)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libresolv.so.2", O_RDONLY)   = 5
read(5, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\240)\0"..., 512) = 512
fstat64(5, {st_mode=S_IFREG|0644, st_size=64924, ...}) = 0
old_mmap(NULL, 73640, PROT_READ|PROT_EXEC, MAP_PRIVATE, 5, 0) = 0x40167000
old_mmap(0x40176000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 5, 0xf000) = 0x40176000
old_mmap(0x40177000, 8104, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40177000
close(5)                                = 0
munmap(0x40157000, 45739)               = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 5
connect(5, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("138.74.0.62")}, 28) = 0
send(5, "\331\242\1\0\0\1\0\0\0\0\0\0\003196\00210\00274\003138"..., 44, 0) = 44
gettimeofday({1144877172, 829859}, NULL) = 0
poll([{fd=5, events=POLLIN, revents=POLLIN}], 1, 5000) = 1
ioctl(5, FIONREAD, [102])               = 0
recvfrom(5, "\331\242\205\203\0\1\0\0\0\1\0\0\003196\00210\00274\003"..., 1024, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("138.74.0.62")}, [16]) = 102
close(5)                                = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
Comment 1 Gerd Behrmann 2006-04-19 17:28:30 CEST
From your strace I notice that it fails right before the socketserver forks off the actual verification process (server). Which version of Debian do you use? And which kernel version?

I tried to replicate the problem by running the socketserver on Debian stable with the 2.6.8-2-686-smp kernel provided by the distribution. The GUI ran on Windows XP SP2 with Java version 1.5 update 6. I was unable to replicate the segfault.
Comment 2 Gerd Behrmann 2006-04-20 19:31:02 CEST
I may have an explanation of the crash. Can you please try to do a 'dig -x a.b.c.d' on the Linux box, where a.b.c.d is the ip address of the Windows machine. What is the output?
Comment 3 Dawn Rohm 2006-04-20 20:33:51 CEST
Are you thinking that it is crashing because there is no reverse lookup for the windows IP address?  I confirmed that there is not a reverse lookup for this particular windows machine.  I have the output below as well as additional O/S version info.

dig -x 138.74.10.102 output:

; <<>> DiG 9.2.4 <<>> -x 138.74.10.102
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 30025
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;102.10.74.138.in-addr.arpa.    IN      PTR

;; AUTHORITY SECTION:
74.138.in-addr.arpa.    3600    IN      SOA     ns1.snc.edu. postmaster.snc.edu. 2006032901 72001 1800 3628800 14400

;; Query time: 1 msec
;; SERVER: 138.74.0.62#53(138.74.0.62)
;; WHEN: Thu Apr 20 13:24:15 2006
;; MSG SIZE  rcvd: 102


Debian Linux uname -a output:
Linux favre 2.4.27-2-386 #1 Wed Aug 17 09:33:35 UTC 2005 i686 GNU/Linux

Windows Info:
Windows XP Professional, Version 2002, Service Pack 2
Comment 4 Gerd Behrmann 2006-04-20 21:03:30 CEST
Yep, that's it. It does a reverse lookup before it prints the "Connection from ..." message, but it doesn't handle the failure. It will be fixed for beta 3. Thanks for helping me debug this.
Comment 5 Gerd Behrmann 2006-04-24 13:56:16 CEST
Fixed on the trunk from rev. 1740.