egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

eggdrop segfaults when connecting to ssl server on AMD64

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Eggdrop Help
View previous topic :: View next topic  
Author Message
paef
Voice


Joined: 27 Sep 2008
Posts: 3

PostPosted: Sat Sep 27, 2008 9:42 pm    Post subject: eggdrop segfaults when connecting to ssl server on AMD64 Reply with quote

Hello. just installed eggdrop1.6.19 on a computer with an amd64 processor and debian 64bit (lenny) installed on it. The egg is patched with the ssl path for 1.6.19.

On build i got a few warnings but it compiled.

When trying to start it just hangs. when doing running it with -n flag i get:
Code:

STARTING BOT IN USERFILE CREATION MODE.
Telnet to the bot and enter 'NEW' as your nickname.
OR go to IRC and type:  /msg Pierre hello
This will make the bot recognize you as the master.

[05:33] === velo: 0 channels, 0 users.
[05:33] main: entering loop
[05:33] Trying server my.ssl.server.com:27015
[05:33] DNS resolved my.ssl.server.com to xx.xxx.xx.xx
[05:33] net_switch_to_ssl()


And there it halts.

If i do a strace on the whole thing i get this output:
Code:

write(1, "[05:35] main: entering loop\n"..., 28[05:35] main: entering loop
) = 28
write(4, "\0"..., 1)                    = 1
futex(0x1cafe30, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x1d00790, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x1d00794, FUTEX_WAIT_PRIVATE, 1, NULL) = -1 EAGAIN (Resource temporarily unavailable)
futex(0x1cafe30, FUTEX_WAKE_PRIVATE, 1) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1892, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1892, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1892, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1892, ...}) = 0
write(1, "[05:35] Trying server my.ssl.server.com"..., 41[05:35] Trying server my.ssl.server.com:7000
) = 41
stat("/etc/resolv.conf", {st_mode=S_IFREG|0644, st_size=23, ...}) = 0
sendto(6, "\267\35\1\0\0\1\0\0\0\0\0\0\3irc\5ldftw\2nu\0\0\1\0\1"..., 30, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.0.1")}, 16) = 30
getrlimit(RLIMIT_NOFILE, {rlim_cur=1024, rlim_max=1024}) = 0
getrlimit(RLIMIT_NOFILE, {rlim_cur=1024, rlim_max=1024}) = 0
select(1024, [5 6], NULL, NULL, {1, 0}) = 1 (in [6], left {0, 792000})
recvfrom(6, "\267\35\201\200\0\1\0\1\0\5\0\5\3irc\5ldftw\2nu\0\0\1\0\1\300\f\0"..., 512, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.0.1")}, [16]) = 225
futex(0x7fc9c6329000, FUTEX_WAKE_PRIVATE, 2147483647) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1892, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1892, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1892, ...}) = 0
write(1, "[05:35] DNS resolved my.ssl.server.com"..., 50[05:35] DNS resolved my.ssl.server.com to xx.xx.xx.xx
) = 50
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 9
setsockopt(9, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
setsockopt(9, SOL_SOCKET, SO_LINGER, [0], 4) = -1 EINVAL (Invalid argument)
fcntl(9, F_SETFL, O_RDONLY|O_NONBLOCK)  = 0
bind(9, {sa_family=AF_INET, sin_port=htons(0), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
connect(9, {sa_family=AF_INET, sin_port=htons(27015), sin_addr=inet_addr("xx.xx.xx.xx")}, 16) = -1 EINPROGRESS (Operation now in progress)
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1892, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1892, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1892, ...}) = 0
write(1, "[05:35] net_switch_to_ssl()\n"..., 28[05:35] net_switch_to_ssl()
) = 28
brk(0x1d84000)                          = 0x1d84000
write(9, "\200t\1\3\1\0K\0\0\0 \0\0009\0\0008\0\0005\0\0\26\0\0\23\0\0\n\7\0\300\0"..., 118) = -1 EAGAIN (Resource temporarily unavailable)
nanosleep({0, 1000000}, NULL)           = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---

And after that strace exits...

Works fine without the ssl patch. But realy need to be able to connect to ssl secured servers. Think that it is the debian x64 platform vs the ssl patch that don't work that well together but haven't been able to confirm anything.

Been trying everything i can think off, even tried the debian package for eggdrop, but no built in ssl support there from what i could see.
So wondering if anyone got any ideas.. any at all.
Back to top
View user's profile Send private message
dbali
Voice


Joined: 24 Dec 2008
Posts: 3

PostPosted: Wed Dec 24, 2008 9:01 pm    Post subject: Reply with quote

Hi
I have same problem. I try some other openssl and eggdrop versions, but the problem don't leave.
Can anybody help?
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Mon Dec 29, 2008 6:30 am    Post subject: Reply with quote

Could you double-check that the ssl-libraries are linked as 64bit libraries?
Smells like a mixed 32/64bit build.
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
dbali
Voice


Joined: 24 Dec 2008
Posts: 3

PostPosted: Thu Jan 01, 2009 5:13 pm    Post subject: Reply with quote

no, it's only 64bit build. I try with the original, apt-installed version openssl, and few own compiled versions (to my home dir), but doesn't work. On 3 debian lenny AMD64 servers have i this error...

started with strace:
Code:

....
write(1, "[22:07] DNS resolved irc.*.*"..., 51[22:07] DNS resolved irc.*.* to *.*.*.*
) = 51
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 8
setsockopt(8, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
setsockopt(8, SOL_SOCKET, SO_LINGER, [0], 4) = -1 EINVAL (Invalid argument)
fcntl(8, F_SETFL, O_RDONLY|O_NONBLOCK)  = 0
bind(8, {sa_family=AF_INET, sin_port=htons(0), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
connect(8, {sa_family=AF_INET, sin_port=htons(6697), sin_addr=inet_addr("*.*.*.*")}, 16) = -1 EINPROGRESS (Operation now in progress)
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2407, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2407, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2407, ...}) = 0
write(1, "[22:07] net_switch_to_ssl()\n"..., 28[22:07] net_switch_to_ssl()
) = 28
brk(0x191b000)                          = 0x191b000
write(8, "\200t\1\3\1\0K\0\0\0 \0\0009\0\0008\0\0005\0\0\26\0\0\23\0\0\n\7\0\300\0"..., 118) = -1 EAGAIN (Resource temporarily unavailable)
nanosleep({0, 1000000}, NULL)           = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
futex(0x7fec531589e0, FUTEX_WAIT_PRIVATE, 2, NULL


and don't make anything else..
With irssi, this servers working with ssl, but eggdrop don't. When 1 delete from the eggdrop.conf the "set use-ssl 1" it's work fine, but i must connect with ssl..

any ideas?
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Sat Jan 03, 2009 7:55 am    Post subject: Reply with quote

None at the moment, I'm afraid :/

One workaround might be to use 6tunnel?
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
dustoff
Voice


Joined: 16 Jan 2009
Posts: 1

PostPosted: Fri Jan 16, 2009 5:51 am    Post subject: Reply with quote

I'm having the exact same problem. Debian lenny/testing amd-64, and I'm going to attach a list of ssl libs installed on this host.

package version
libssl-dev 0.9.8g-15
libssl0.9.7 0.9.7k-3.1etch2
libssl0.9.8 0.9.8g-15
openssl 0.9.8g-15
Back to top
View user's profile Send private message
dupondje
Voice


Joined: 17 Jan 2009
Posts: 1

PostPosted: Sat Jan 17, 2009 7:49 am    Post subject: Reply with quote

Tryout the new patch on egghelp Smile It should solve ssl problems on 64bit systems!
Back to top
View user's profile Send private message
dbali
Voice


Joined: 24 Dec 2008
Posts: 3

PostPosted: Tue Jan 20, 2009 5:15 pm    Post subject: Reply with quote

thx, it's works Smile
Back to top
View user's profile Send private message
pzYsTorM
Voice


Joined: 17 Sep 2009
Posts: 3

PostPosted: Thu Sep 17, 2009 9:25 am    Post subject: Reply with quote

The problem seems not fixed yet.

Eggdrop 1.6.19 with ctcpfix and ssl patch.

Code:

$ strace ./eggdrop -nt
...
fstat(9, {st_mode=S_IFREG|0644, st_size=7630, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4fd8139000
read(9, "%{help=help}%{-}\nDCC commands for"..., 4096) = 4096
read(9, "s a language from the language li"..., 4096) = 3534
read(9, ""..., 4096)                    = 0
close(9)                                = 0
munmap(0x7f4fd8139000, 4096)            = 0
stat("help/set/core.help", 0x7fffe02f5ee0) = -1 ENOENT (No such file or directory)
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2309, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2309, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2309, ...}) = 0
write(4, "\0"..., 1)                    = 1
futex(0x67dc30, FUTEX_WAKE_PRIVATE, 1)  = 1
futex(0xf4c510, FUTEX_WAKE_PRIVATE, 1)  = 1
futex(0xf4c514, FUTEX_WAIT_PRIVATE, 1, NULL) = -1 EAGAIN (Resource temporarily unavailable)
futex(0x67dc30, FUTEX_WAKE_PRIVATE, 1)  = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2309, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2309, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2309, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2309, ...}) = 0
write(1, "[14:33] Trying server xx.xx.xx."..., 41[14:33] Trying server xx.xx.xx.xx:6670
) = 41
futex(0x7f4fd6f6a000, FUTEX_WAKE_PRIVATE, 2147483647) = 0
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 9
setsockopt(9, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
setsockopt(9, SOL_SOCKET, SO_LINGER, [0], 4) = -1 EINVAL (Invalid argument)
fcntl(9, F_SETFL, O_RDONLY|O_NONBLOCK)  = 0
bind(9, {sa_family=AF_INET, sin_port=htons(0), sin_addr=inet_addr("yy.yy.yy.yy")}, 16) = 0
connect(9, {sa_family=AF_INET, sin_port=htons(6670), sin_addr=inet_addr("xx.xx.xx.xx")}, 16) = -1 EINPROGRESS (Operation now in progress)
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2309, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2309, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2309, ...}) = 0
write(9, "\200t\1\3\1\0K\0\0\0 \0\0009\0\0008\0\0005\0\0\26\0\0\23\0\0\n\7\0\300\0"..., 118) = -1 EAGAIN (Resource temporarily unavailable)
nanosleep({0, 1000000}, NULL)           = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
futex(0x7f4fd6f679e0, FUTEX_WAIT_PRIVATE, 2, NULL


Any ideas?

Tcl8.4... Tcl8.5... there is no difference.
Back to top
View user's profile Send private message
pzYsTorM
Voice


Joined: 17 Sep 2009
Posts: 3

PostPosted: Sat Sep 26, 2009 12:23 pm    Post subject: Reply with quote

Still getting this bug Sad

Ive compiled a brand new eggdrop without any patches from the website. The error is the same.

Code:

(gdb) thread apply all bt

Thread 1 (Thread 0x7fb1e5a626e0 (LWP 24116)):
#0  0x00007fb1e4932d29 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007fb1e561712b in Tcl_ConditionWait () from /usr/lib/libtcl8.5.so.0
#2  0x00007fb1e5617fbf in Tcl_WaitForEvent () from /usr/lib/libtcl8.5.so.0
#3  0x00007fb1e55e2c4e in Tcl_DoOneEvent () from /usr/lib/libtcl8.5.so.0
#4  0x00000000004275b2 in ?? ()
#5  0x00007fb1e4b621a6 in __libc_start_main () from /lib/libc.so.6
#6  0x00000000004032d9 in ?? ()
#7  0x00007fffeda6f378 in ?? ()
#8  0x000000000000001c in ?? ()
#9  0x0000000000000001 in ?? ()
#10 0x00007fffeda6faba in ?? ()
#11 0x0000000000000000 in ?? ()
#0  0x00007fb1e4932d29 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0


Code:

$ strace -p 24116
Process 24116 attached - interrupt to quit
futex(0x6c29b4, FUTEX_WAIT_PRIVATE, 1, NULL^C <unfinished ...>
Process 24116 detached
Back to top
View user's profile Send private message
pzYsTorM
Voice


Joined: 17 Sep 2009
Posts: 3

PostPosted: Mon Sep 28, 2009 7:12 pm    Post subject: Reply with quote

Arrrrr....


just patch the eggdrop with
http://www.egghelp.org/files/patches/eggdrop-1.6.19-ssl_and_md5_and_thread-durex.patch.gz

and everything is good.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Eggdrop Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber