View Issue Details

IDProjectCategoryView StatusLast Update
0001984unrealircdpublic2004-07-22 11:54
Reporterlion Assigned To 
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionopen 
Product Version3.2.1 
Summary0001984: Solaris: Connecting with SSL causes instant crash
DescriptionI connect with mIRC 6.15 using its built-in SSL, and the server crashes immediately upon attempted connect. Regular connections work fine. The exact same configuration file works in the 3.2 release (except cloak-keys are changed for the new format, and the cloak module is loaded, in the 3.2.1 version of the config file, which I would not expect to have an effect), which is what I'm presently running.
Steps To Reproduce1. Start Unreal ircd on server.
2. Connect with mIRC prepending the port number with a + to indicate SSL.
Additional InformationOpenSSL library is 0.9.7d, dynamically loaded.
Compiled with GCC version 3.4.1. I modified the CC environment variable to run with "gcc -ggdb" in the hopes of providing the most informative output.

GDB output from core file:

> gdb bin/ircd.3.2.1 core
GNU gdb 6.0
Copyright 2003 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 "sparc-sun-solaris2.9"...
Core was generated by `bin/ircd'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/local/lib/libssl.so.0.9.7...done.
Loaded symbols for /usr/local/lib/libssl.so.0.9.7
Reading symbols from /usr/local/lib/libcrypto.so.0.9.7...done.
Loaded symbols for /usr/local/lib/libcrypto.so.0.9.7
Reading symbols from /usr/lib/libcrypt_d.so.1...done.
Loaded symbols for /usr/lib/libcrypt_d.so.1
Reading symbols from /usr/lib/libsocket.so.1...done.
Loaded symbols for /usr/lib/libsocket.so.1
Reading symbols from /usr/lib/libnsl.so.1...done.
Loaded symbols for /usr/lib/libnsl.so.1
Reading symbols from /usr/local/lib/libz.so...done.
Loaded symbols for /usr/local/lib/libz.so
Reading symbols from /usr/lib/libdl.so.1...done.
Loaded symbols for /usr/lib/libdl.so.1
Reading symbols from /usr/lib/libresolv.so.2...done.
Loaded symbols for /usr/lib/libresolv.so.2
Reading symbols from /usr/lib/libc.so.1...done.
Loaded symbols for /usr/lib/libc.so.1
Reading symbols from /usr/local/lib/libgcc_s.so.1...done.
Loaded symbols for /usr/local/lib/libgcc_s.so.1
Reading symbols from /usr/lib/libgen.so.1...done.
Loaded symbols for /usr/lib/libgen.so.1
Reading symbols from /usr/lib/libmp.so.2...done.
Loaded symbols for /usr/lib/libmp.so.2
Reading symbols from /usr/platform/SUNW,Ultra-1/lib/libc_psr.so.1...done.
Loaded symbols for /usr/platform/SUNW,Ultra-1/lib/libc_psr.so.1
Reading symbols from tmp/83B6580.commands.so...done.
Loaded symbols for tmp/83B6580.commands.so
---Type <return> to continue, or q <return> to quit---
Reading symbols from tmp/DCC93725.cloak.so...done.
Loaded symbols for tmp/DCC93725.cloak.so
#0 0xfef46d14 in _malloc_unlocked () from /usr/lib/libc.so.1
(gdb) bt
#0 0xfef46d14 in _malloc_unlocked () from /usr/lib/libc.so.1
#1 0xfef46b7c in malloc () from /usr/lib/libc.so.1
#2 0xff23d328 in default_malloc_ex () from /usr/local/lib/libcrypto.so.0.9.7
(gdb)

I do not understand why it does not show any stack frames from the IRC code itself. Let me know if I can provide more information.
3rd party modules

Activities

codemastr

2004-07-21 15:45

reporter   ~0007190

Works fine here. And unfortunately, that output is 100% useless since it doesn't tell me what caused the crash at all.

Zell

2004-07-21 15:59

reporter   ~0007192

this is a *nix compile im assuming.... (since the only way to have gdb on win32 is to get MinGW)...
some things to check:

is the listen block got the ssl option?
did you make your certificate?
are there any errors on compiling at all?
does the ircd crash when you do /rehash ?
are there any errors in ircd.log related to the error that makes it crash?
(cant see why this would make it crash, but, is your SSL dll's in the mIRC folder?)

because i dont normally code in *nix, finding this problem myself would be near impossible... especially since it works fine for me :-/
Running:
Mandrake Linux 10.0
OpenSSL 0.9.7d
mIRC 6.14, mIRC 6.16 tested both OK

maybe someone else has some other information, as im stumped :-|

syzop

2004-07-21 16:20

administrator   ~0007196

A few questions:
1. And when you were running 3.2, did you also use SSL in 3.2 and did it go fine?
2. Was openssl upgraded in the meantime? (between 3.2 -> 3.2.1)
3. Could you try with (very) latest CVS?
   cvs -d :pserver:[email protected]:/home/cmunk/ircsystems/cvsroot login
   [press enter when asked for a pass]
   cvs -d :pserver:[email protected]:/home/cmunk/ircsystems/cvsroot co -r unreal3_2_fixes -d Unreal3.2-cvs unreal

syzop

2004-07-21 17:09

administrator   ~0007198

Oh and another wild guess:
could it be your gcc? Perhaps you could recompile openssl with gcc3.4.1 if you didn't do that already. [http://gcc.gnu.org/gcc-3.4/sparc-abi.html]

lion

2004-07-21 17:23

reporter   ~0007199

1) The listen block does have the SSL option. As mentioned, this configuration file works with the 3.2 version with SSL compiled in. I can connect to that server with SSL with mIRC. I have created and am using a server certificate. It's self-signed, but it works. I think GCC was upgraded, however.

2) There were no compliation errors. I didn't watch it close enough to see if there were any warnings, but just configure, make, done.

3) /rehash does not cause a crash.

4) ircd.log does not have any relevant information. Just connects, disconnects, OPERs, that sort of thing.

5) OpenSSL has not been upgraded. My working compile of 3.2 makes use of library 0.9.7d. That version of the IRC server is still running, and still accepting SSL connections successfully.

 --

After monitoring further responses to this thread, I am attempting the following:

  1) syzop's point about GCC and its SPARC calling convention problems is something of which I was unaware. I am currently attempting to recompile the OpenSSL libraries with Sun's compilers, as the OpenSSL config script seems to prefer that over gcc, since I would hope Sun's own compilers don't have any weird calling convention problems. I may attempt to compile it again with gcc afterwards.
  2) I am also attempting to compile all of the latest CVS as directed, as well as the 3.2.1 release, as well as the 3.2 release which I'm currently using. Those are currently running in the background as I type and I will post results when they finish to see which work, and which do not. If the 3.2 release suddenly stops working, then it may be this library problem.

lion

2004-07-21 18:22

reporter   ~0007200

Results thus far:

Without doing anything to the SSL libraries, Unreal3.2 compiles and runs fine. I'm able to make an SSL connection to it.

Unreal3.2.1 release compiles, and still crashes as soon as an SSL connection is attempted. GDB's output is still similarly useless as before.

Latest Unreal CVS compiles and seems to be working alright at a first test. Well, maybe this isn't an issue after all.

syzop

2004-07-21 23:16

administrator   ~0007204

Good. I guess the bugreport can be closed then? ;).

lion

2004-07-22 01:12

reporter   ~0007205

I guess it can. Something in the CVS version must have fixed whatever was causing the trouble.

syzop

2004-07-22 10:38

administrator   ~0007212

Heh. I wonder if this was due to md5 too (I just closed an SSL+crash-on-connect issue a day earlier)...
You could try this: remove the '#include "config.h"' line from src/md5.c (somewhere @ top) and run 'make && make install' (no make clean etc needed) and see if it then crashes again on first ssl connect.

lion

2004-07-22 11:52

reporter   ~0007213

Yup. When I recompile md5.c without the #include "config.h", it blows up in the exact same way. I guess the mystery is solved.

syzop

2004-07-22 11:54

administrator   ~0007214

Thanks :).
Such info is always helpful so we know what to put in release notes etc.

Issue History

Date Modified Username Field Change
2004-07-21 15:18 lion New Issue
2004-07-21 15:45 codemastr Note Added: 0007190
2004-07-21 15:59 Zell Note Added: 0007192
2004-07-21 16:03 syzop Summary Connecting with SSL causes instant crash => Solaris: Connecting with SSL causes instant crash
2004-07-21 16:20 syzop Note Added: 0007196
2004-07-21 17:09 syzop Note Added: 0007198
2004-07-21 17:23 lion Note Added: 0007199
2004-07-21 18:22 lion Note Added: 0007200
2004-07-21 23:16 syzop Note Added: 0007204
2004-07-22 01:12 lion Note Added: 0007205
2004-07-22 10:38 syzop Note Added: 0007212
2004-07-22 11:52 lion Note Added: 0007213
2004-07-22 11:54 syzop Status new => closed
2004-07-22 11:54 syzop Note Added: 0007214