Project

General

Profile

Actions

Bug #95

closed

Strange problem with errno and latest Sylpheed from pkgsrc

Added by steve over 18 years ago. Updated about 18 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Hi,

I've hit a really odd problem with the latest pkgsrc sylpheed
under 1.5.0 Preview. Attempts to fetch mail from my POP3 servers always
fail instantly - using gdb I tracked the problem to this bit of code:

-----------------------------------------------------------
if (connect(sock, addr_data->addr, addr_data->addr_len) < 0) {
if (EINPROGRESS == errno) {
break;
} else {
perror("connect");
fd_close(sock);
}
------------------------------------------------------------

It produces the message

connect: Operation now in progress

Which would seem to indicate that errno is EINPROGRESS, but
in gdb print errno produces - $1 1179403647 which is an absurd number.
At this point I am confused, I have hacked the code to pretend
connect cannot fail in order to use the application but that's not really
a solution :)
Can any one shed any light on this please.
Actions #1

Updated by joerg over 18 years ago

On Mon, Feb 20, 2006 at 12:07:34PM +0000, Steve O'Hara-Smith wrote:

I've hit a really odd problem with the latest pkgsrc sylpheed
under 1.5.0 Preview. Attempts to fetch mail from my POP3 servers always
fail instantly - using gdb I tracked the problem to this bit of code:

Can you please ktrace sylpheed? Next time, please mention that you use
sylpheed-devel :-)

Which would seem to indicate that errno is EINPROGRESS, but
in gdb print errno produces - $1 1179403647 which is an absurd number.

Bug in gdb.

Joerg

Actions #2

Updated by steve over 18 years ago

On Mon, 20 Feb 2006 14:19:24 +0100
wrote:

On Mon, Feb 20, 2006 at 12:07:34PM +0000, Steve O'Hara-Smith wrote:

I've hit a really odd problem with the latest pkgsrc sylpheed
under 1.5.0 Preview. Attempts to fetch mail from my POP3 servers always
fail instantly - using gdb I tracked the problem to this bit of code:

Can you please ktrace sylpheed?

Certainly full ktrace.out is at ftp:ftp.sohara.org/pub/ktrace.out

The relevant section of kdump -tc seems to be
94265 sylpheed RET   socket 8
94265 sylpheed CALL fcntl(0x8,0x3,0)
94265 sylpheed RET fcntl 2
94265 sylpheed CALL fcntl(0x8,0x4,0x6)
94265 sylpheed RET fcntl 0
94265 sylpheed CALL fcntl(0x8,0x4,0x6)
94265 sylpheed RET fcntl 0
94265 sylpheed CALL fcntl(0x8,0x3,0)
94265 sylpheed RET fcntl 6
94265 sylpheed CALL connect(0x8,0x82fc120,0x10)
94265 sylpheed RET connect -1 errno 36 Operation now in progress
94265 sylpheed CALL writev(0x2,0xbfbfe4b0,0x4)
94265 sylpheed RET writev 35/0x23
94265 sylpheed CALL fstat(0x8,0xbfbfe500)
94265 sylpheed RET fstat 0
94265 sylpheed CALL close(0x8)
94265 sylpheed RET close 0

Next time, please mention that you use sylpheed-devel :-)

It's not sylpheed-devel 2.2.0 has been released and mail/sylpheed
has been updated to it yesterday :)

I got another core dump from it anyway so for now I have
reverted to 2.0.4 and I have 2.2.0 built but not installed.

Which would seem to indicate that errno is , but
in gdb print errno produces - $1 1179403647 which is an absurd number.

Bug in gdb.

Perhaps - but AFAICT that message should not have come out of
perror because the other branch should have been taken in the case that
errno == EINPROGRESS.

I changed the code a little to check:

------------------------------------------------------------------------------
if (connect(sock, addr_data->addr, addr_data->addr_len) < 0) {
fprintf (stderr, "Connect failed - errno = %d\n", errno);
if (EINPROGRESS == errno) {
break;
} else {
perror("connect");
fd_close(sock);
}
} else
break;
}
-------------------------------------------------------------------------------

I got this result:

Connect failed - errno = 672793088
connect: Operation now in progress

It really looks like perror() and the code are seeing different
errno variables :(
Everything uses #include &lt;errno&gt; with no sign of extern int errno
hackery.
This smells badly of thread problems to me.
Actions #3

Updated by steve over 18 years ago

On Mon, 20 Feb 2006 14:06:01 +0000
"Steve O'Hara-Smith" <> wrote:

On Mon, 20 Feb 2006 14:19:24 +0100
wrote:

On Mon, Feb 20, 2006 at 12:07:34PM +0000, Steve O'Hara-Smith wrote:

I've hit a really odd problem with the latest pkgsrc sylpheed
under 1.5.0 Preview. Attempts to fetch mail from my POP3 servers always
fail instantly - using gdb I tracked the problem to this bit of code:

Can you please ktrace sylpheed?

Certainly full ktrace.out is at ftp:ftp.sohara.org/pub/ktrace.out

The relevant section of kdump -tc seems to be

94265 sylpheed RET socket 8
94265 sylpheed CALL fcntl(0x8,0x3,0)
94265 sylpheed RET fcntl 2
94265 sylpheed CALL fcntl(0x8,0x4,0x6)
94265 sylpheed RET fcntl 0
94265 sylpheed CALL fcntl(0x8,0x4,0x6)
94265 sylpheed RET fcntl 0
94265 sylpheed CALL fcntl(0x8,0x3,0)
94265 sylpheed RET fcntl 6
94265 sylpheed CALL connect(0x8,0x82fc120,0x10)
94265 sylpheed RET connect -1 errno 36 Operation now in progress
94265 sylpheed CALL writev(0x2,0xbfbfe4b0,0x4)
94265 sylpheed RET writev 35/0x23
94265 sylpheed CALL fstat(0x8,0xbfbfe500)
94265 sylpheed RET fstat 0
94265 sylpheed CALL close(0x8)
94265 sylpheed RET close 0

Next time, please mention that you use sylpheed-devel :-)

It's not sylpheed-devel 2.2.0 has been released and mail/sylpheed
has been updated to it yesterday :)

I got another core dump from it anyway so for now I have
reverted to 2.0.4 and I have 2.2.0 built but not installed.

2.2.1 is just out - it fixes the other core dump but this
problem remains in it. Hacking it to assume that the only error from
connect will be EINPROGRESS makes the whole thing work AFAICT.

Actions #4

Updated by joerg over 18 years ago

On Mon, Feb 27, 2006 at 06:02:51PM +0000, Steve O'Hara-Smith wrote:

2.2.1 is just out - it fixes the other core dump but this
problem remains in it. Hacking it to assume that the only error from
connect will be EINPROGRESS makes the whole thing work AFAICT.

I'll look at it later this week, when GTK is rebuild :-)

Joerg

Actions #5

Updated by corecode about 18 years ago

Is this still present?

Actions #6

Updated by steve about 18 years ago

On Mon, 02 Oct 2006 14:03:48 -0000
Simon 'corecode' Schubert <> wrote:

Simon 'corecode' Schubert <> added the comment:

Is this still present?

Thanks for the prod. I just pulled out my hack and checked.

The problem is gone on 1.7.0-PREVIEW.
Actions

Also available in: Atom PDF