Subject: bug#13546: 24.2.92; Error(s) when sending emails

From: "Sebastien Vauban" <[email-masked]>
Date: Tue, 12 Feb 2013 18:48:19 +0100

Eli,

"Sebastien Vauban" wrote:
> Eli Zaretskii wrote:
>> To catch this message:
>>
>>   warning: sys_read called when read is in progress
>>
>> please put an additional breakpoint on line 6410 of w32.c, which says:
>>
>>         DebPrint (("sys_read called when read is in progress\n"));
>>
>> and when it breaks, please do:
>>
>>   (gdb) p fd_info[fd]
>>   (gdb) p fd
>>   (gdb) p *cp
>
> OK, I do this:
>
> 1. Launch Emacs 24.2.93
>
> 2. Go to c:\Program Files (x86)\Emacs-24.2.93\bin
>
> 3. Run: gdb -p 15276
>    XXX not sure about having to reference emacs.exe?
>    XXX or should I start somehow Emacs from GDB?
>
> 4. Type in GDB:
>    (gdb) break fileio.c:4913
>    (gdb) break w32.c:6410
>    (gdb) continue
>
> 5. Wait for problems, and do what you wrote in these threads.

I went fast for the 2nd breakpoint: just launching Gnus already gives me 2
occurrences of them:

--8<---------------cut here---------------start------------->8---
Reading symbols from /cygdrive/c/Program Files (x86)/emacs-24.2.93/bin/emacs.exe...done.
(gdb) break fileio.c:4913
Breakpoint 1 at 0x106380e: file fileio.c, line 4913.
(gdb) break w32.c:6410
Breakpoint 2 at 0x108fca5: file w32.c, line 6410.
(gdb) continue
Continuing.
[New Thread 15276.0x3b20]
[New Thread 15276.0x39a8]
[New Thread 15276.0x5524]
[New Thread 15276.0x4948]
[New Thread 15276.0x6258]
[New Thread 15276.0x614c]
[New Thread 15276.0x1c1c]
[Switching to Thread 15276.0x6ea0]

Breakpoint 2, sys_read (fd=3, buffer=0x5a28034 "", count=5) at w32.c:6410
(gdb) 6410      w32.c: No such file or directory.
p fd_info[fd]
$1 = {flags = 1555, hnd = 0x30c, cp = 0x1680c60}
(gdb) p fd
$2 = 3
(gdb) p *cp
$3 = {fd = 3, pid = -1, char_avail = 0x314, char_consumed = 0x318, thrd = 0x31c, hwnd = 0x0,
  procinfo = {hProcess = 0x0, hThread = 0x0, dwProcessId = 0, dwThreadId = 0}, status = 1,
  chr = 22 '\026', ovl_read = {Internal = 0, InternalHigh = 0, {{Offset = 0, OffsetHigh = 0},
      Pointer = 0x0}, hEvent = 0x0}, ovl_write = {Internal = 0, InternalHigh = 0, {{Offset = 0,
        OffsetHigh = 0}, Pointer = 0x0}, hEvent = 0x0}}
(gdb) continue
Continuing.
warning: sys_read called when read is in progress
[New Thread 15276.0x1f58]
[New Thread 15276.0x2844]
[New Thread 15276.0x6d70]
[New Thread 15276.0x5ccc]

Breakpoint 2, sys_read (fd=5, buffer=0x5ae0034 "", count=5) at w32.c:6410
6410    in w32.c
(gdb) p fd_info[fd]
$4 = {flags = 1555, hnd = 0x344, cp = 0x1680d10}
(gdb) p fd
$5 = 5
(gdb) p *cp
$6 = {fd = 5, pid = -1, char_avail = 0x358, char_consumed = 0x354, thrd = 0x350, hwnd = 0x0,
  procinfo = {hProcess = 0x0, hThread = 0x0, dwProcessId = 0, dwThreadId = 0}, status = 1,
  chr = 22 '\026', ovl_read = {Internal = 0, InternalHigh = 0, {{Offset = 0, OffsetHigh = 0},
      Pointer = 0x0}, hEvent = 0x0}, ovl_write = {Internal = 0, InternalHigh = 0, {{Offset = 0,
        OffsetHigh = 0}, Pointer = 0x0}, hEvent = 0x0}}
(gdb) continue
Continuing.
warning: sys_read called when read is in progress
[New Thread 15276.0x2eb8]
--8<---------------cut here---------------end--------------->8---

Does it help?

Best regards,
  Seb

-- 
Sebastien Vauban