Your message dated Sun, 4 Sep 2011 11:37:31 -0700
with message-id <[email protected]>
and subject line Re: Bug#615557: Broken select loop, not interruptable
has caused the Debian Bug report #615557,
regarding Broken select loop, not interruptable
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
615557: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=615557
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: libdpkg-ruby1.8
Version: 0.3.6+nmu1
Severity: important

Hi, this problem is related to 585448 but is not quite the same. Even
after increasing the file descriptor limit, apt-listbugs seems to hang
in the next stage.

It looks like the select call includes some bad file descriptors and the
loop does not handle EBADF properly. It simply keeps looping.
Furthermore, the process does not respond to SIGTERM anymore (or
whatever apt-listbugs uses to send a termination hint internally). Only
kill -9 helps.

And another thing: what is this fcntl orgy, why do you need the
gazillions of fcntls? Cannot this be done in a faster, less
cpu-consuming way, like setting the flags once and remember the state of
the file descriptors?

The strace log looks like this:

[pid 24904] fcntl64(1147, F_GETFD)      = 0
[pid 24904] fcntl64(1148, F_GETFD)      = 0
[pid 24904] fcntl64(1149, F_GETFD)      = -1 EBADF (Bad file descriptor)
[pid 24904] clock_gettime(CLOCK_MONOTONIC, {3918, 586781073}) = 0
[pid 24904] select(1150, [1025 1026 1033 1056 1060 1063 1064 1065 1068 1070 
1071 1075 1096 1097 1098 1099 1100 1102 1104 1105 1109 1110 1112 1113 1114 1116 
1117 1119 1123 1129 1130 1132 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 
1147 1148 1149], [], [], {518, 578449}) = -1 EBADF (Bad file descriptor)
[pid 24904] fcntl64(1025, F_GETFD)      = 0
[pid 24904] fcntl64(1026, F_GETFD)      = 0
[pid 24904] fcntl64(1033, F_GETFD)      = 0
[pid 24904] fcntl64(1057, F_GETFD)      = 0
[pid 24904] fcntl64(1058, F_GETFD)      = 0
[pid 24904] fcntl64(1059, F_GETFD)      = 0
[pid 24904] fcntl64(1063, F_GETFD)      = 0
[pid 24904] fcntl64(1064, F_GETFD)      = 0
[pid 24904] fcntl64(1065, F_GETFD)      = 0
[pid 24904] fcntl64(1068, F_GETFD)      = 0
[pid 24904] fcntl64(1070, F_GETFD)      = 0
[pid 24904] fcntl64(1071, F_GETFD)      = 0
[pid 24904] fcntl64(1075, F_GETFD)      = 0
[pid 24904] fcntl64(1096, F_GETFD)      = 0
[pid 24904] fcntl64(1097, F_GETFD)      = 0
[pid 24904] fcntl64(1098, F_GETFD)      = 0
[pid 24904] fcntl64(1099, F_GETFD)      = 0
[pid 24904] fcntl64(1100, F_GETFD)      = 0
[pid 24904] fcntl64(1102, F_GETFD)      = 0
[pid 24904] fcntl64(1104, F_GETFD)      = 0
[pid 24904] fcntl64(1105, F_GETFD)      = 0
[pid 24904] fcntl64(1109, F_GETFD)      = 0
[pid 24904] fcntl64(1110, F_GETFD)      = 0
[pid 24904] fcntl64(1112, F_GETFD)      = 0
[pid 24904] fcntl64(1113, F_GETFD)      = 0
[pid 24904] fcntl64(1114, F_GETFD)      = 0
[pid 24904] fcntl64(1116, F_GETFD)      = 0
[pid 24904] fcntl64(1117, F_GETFD)      = 0
[pid 24904] fcntl64(1119, F_GETFD)      = 0
[pid 24904] fcntl64(1123, F_GETFD)      = 0
[pid 24904] fcntl64(1129, F_GETFD)      = 0
[pid 24904] fcntl64(1130, F_GETFD)      = 0
[pid 24904] fcntl64(1132, F_GETFD)      = 0
[pid 24904] fcntl64(1137, F_GETFD)      = 0
[pid 24904] fcntl64(1138, F_GETFD)      = 0
[pid 24904] fcntl64(1139, F_GETFD)      = 0
[pid 24904] fcntl64(1140, F_GETFD)      = 0
[pid 24904] fcntl64(1141, F_GETFD)      = 0
[pid 24904] fcntl64(1142, F_GETFD)      = 0
[pid 24904] fcntl64(1143, F_GETFD)      = 0
[pid 24904] fcntl64(1144, F_GETFD)      = 0
[pid 24904] fcntl64(1145, F_GETFD)      = 0
[pid 24904] fcntl64(1146, F_GETFD)      = 0
[pid 24904] fcntl64(1147, F_GETFD)      = 0
[pid 24904] fcntl64(1148, F_GETFD)      = 0
[pid 24904] fcntl64(1149, F_GETFD)      = -1 EBADF (Bad file descriptor)
[pid 24904] clock_gettime(CLOCK_MONOTONIC, {3918, 591514635}) = 0
[pid 24904] select(1150, [1025 1026 1033 1056 1057 1060 1064 1070 1071 1075 
1096 1097 1098 1099 1100 1102 1104 1105 1109 1110 1112 1113 1114 1116 1117 1119 
1123 1129 1130 1132 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 
1149], [], [], {518, 573715}) = -1 EBADF (Bad file descriptor)
[pid 24904] fcntl64(1025, F_GETFD)      = 0
[pid 24904] fcntl64(1026, F_GETFD)      = 0
[pid 24904] fcntl64(1033, F_GETFD)      = 0
[pid 24904] fcntl64(1057, F_GETFD)      = 0
[pid 24904] fcntl64(1058, F_GETFD)      = 0
[pid 24904] fcntl64(1059, F_GETFD)      = 0
[pid 24904] fcntl64(1064, F_GETFD)      = 0
[pid 24904] fcntl64(1070, F_GETFD)      = 0
[pid 24904] fcntl64(1071, F_GETFD)      = 0
[pid 24904] fcntl64(1075, F_GETFD)      = 0
[pid 24904] fcntl64(1096, F_GETFD)      = 0
[pid 24904] fcntl64(1097, F_GETFD)      = 0
[pid 24904] fcntl64(1098, F_GETFD)      = 0
[pid 24904] fcntl64(1099, F_GETFD)      = 0
[pid 24904] fcntl64(1100, F_GETFD)      = 0
[pid 24904] fcntl64(1102, F_GETFD)      = 0
[pid 24904] fcntl64(1104, F_GETFD)      = 0
[pid 24904] fcntl64(1105, F_GETFD)      = 0
[pid 24904] fcntl64(1109, F_GETFD)      = 0
[pid 24904] fcntl64(1110, F_GETFD)      = 0
[pid 24904] fcntl64(1112, F_GETFD)      = 0
[pid 24904] fcntl64(1113, F_GETFD)      = 0
[pid 24904] fcntl64(1114, F_GETFD)      = 0
[pid 24904] fcntl64(1116, F_GETFD)      = 0
[pid 24904] fcntl64(1117, F_GETFD)      = 0
[pid 24904] fcntl64(1119, F_GETFD)      = 0
[pid 24904] fcntl64(1123, F_GETFD)      = 0
[pid 24904] fcntl64(1129, F_GETFD)      = 0
[pid 24904] fcntl64(1130, F_GETFD)      = 0
[pid 24904] fcntl64(1132, F_GETFD)      = 0
[pid 24904] fcntl64(1137, F_GETFD)      = 0
[pid 24904] fcntl64(1138, F_GETFD)      = 0
[pid 24904] fcntl64(1139, F_GETFD)      = 0
[pid 24904] fcntl64(1140, F_GETFD)      = 0
[pid 24904] fcntl64(1141, F_GETFD)      = 0
[pid 24904] fcntl64(1142, F_GETFD)      = 0
[pid 24904] fcntl64(1143, F_GETFD)      = 0
[pid 24904] fcntl64(1144, F_GETFD)      = 0
[pid 24904] fcntl64(1145, F_GETFD)      = 0
[pid 24904] fcntl64(1146, F_GETFD)      = 0
[pid 24904] fcntl64(1147, F_GETFD)      = 0
[pid 24904] fcntl64(1148, F_GETFD)      = 0
[pid 24904] fcntl64(1149, F_GETFD)      = -1 EBADF (Bad file descriptor)
[pid 24904] clock_gettime(CLOCK_MONOTONIC, {3918, 596858052}) = 0
[pid 24904] select(1150, [1025 1026 1033 1058 1060 1061 1066 1067 1069 1071 
1075 1096 1097 1098 1099 1100 1102 1104 1105 1109 1110 1112 1113 1114 1116 1117 
1119 1123 1129 1130 1132 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 
1148 1149], [], [], {518, 568372}) = -1 EBADF (Bad file descriptor)
[pid 24904] fcntl64(1025, F_GETFD)      = 0
[pid 24904] fcntl64(1026, F_GETFD)      = 0
[pid 24904] fcntl64(1033, F_GETFD)      = 0
[pid 24904] fcntl64(1060, F_GETFD)      = 0
[pid 24904] fcntl64(1061, F_GETFD)      = 0
[pid 24904] fcntl64(1066, F_GETFD)      = 0
[pid 24904] fcntl64(1067, F_GETFD)      = 0
[pid 24904] fcntl64(1069, F_GETFD)      = 0
[pid 24904] fcntl64(1071, F_GETFD)      = 0
[pid 24904] fcntl64(1075, F_GETFD)      = 0
[pid 24904] fcntl64(1096, F_GETFD)      = 0
[pid 24904] fcntl64(1097, F_GETFD)      = 0
[pid 24904] fcntl64(1098, F_GETFD)      = 0
[pid 24904] fcntl64(1099, F_GETFD)      = 0
[pid 24904] fcntl64(1100, F_GETFD)      = 0
[pid 24904] fcntl64(1102, F_GETFD)      = 0
[pid 24904] fcntl64(1104, F_GETFD)      = 0
[pid 24904] fcntl64(1105, F_GETFD)      = 0
[pid 24904] fcntl64(1109, F_GETFD)      = 0
[pid 24904] fcntl64(1110, F_GETFD)      = 0
[pid 24904] fcntl64(1112, F_GETFD)      = 0
[pid 24904] fcntl64(1113, F_GETFD)      = 0
[pid 24904] fcntl64(1114, F_GETFD)      = 0
[pid 24904] fcntl64(1116, F_GETFD)      = 0
[pid 24904] fcntl64(1117, F_GETFD)      = 0
[pid 24904] fcntl64(1119, F_GETFD)      = 0
[pid 24904] fcntl64(1123, F_GETFD)      = 0
[pid 24904] fcntl64(1129, F_GETFD)      = 0
[pid 24904] fcntl64(1130, F_GETFD)      = 0
[pid 24904] fcntl64(1132, F_GETFD)      = 0
[pid 24904] fcntl64(1137, F_GETFD)      = 0
[pid 24904] fcntl64(1138, F_GETFD)      = 0
[pid 24904] fcntl64(1139, F_GETFD)      = 0
[pid 24904] fcntl64(1140, F_GETFD)      = 0
[pid 24904] fcntl64(1141, F_GETFD)      = 0
[pid 24904] fcntl64(1142, F_GETFD)      = 0
[pid 24904] fcntl64(1143, F_GETFD)      = 0
[pid 24904] fcntl64(1144, F_GETFD)      = 0
[pid 24904] fcntl64(1145, F_GETFD)      = 0
[pid 24904] fcntl64(1146, F_GETFD)      = 0
[pid 24904] fcntl64(1147, F_GETFD)      = 0
[pid 24904] fcntl64(1148, F_GETFD)      = 0
[pid 24904] fcntl64(1149, F_GETFD)      = -1 EBADF (Bad file descriptor)
[pid 24904] clock_gettime(CLOCK_MONOTONIC, {3918, 598794890}) = 0
[pid 24904] select(1150, [1025 1026 1033 1056 1057 1061 1063 1066 1069 1071 
1075 1096 1097 1098 1099 1100 1102 1104 1105 1109 1110 1112 1113 1114 1116 1117 
1119 1123 1129 1130 1132 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 
1148 1149], [], [], {518, 566435}) = -1 EBADF (Bad file descriptor)
[pid 24904] fcntl64(1025, F_GETFD)      = 0
[pid 24904] fcntl64(1026, F_GETFD)      = 0
[pid 24904] fcntl64(1033, F_GETFD)      = 0
[pid 24904] fcntl64(1061, F_GETFD)      = 0
[pid 24904] fcntl64(1063, F_GETFD)      = 0
[pid 24904] fcntl64(1066, F_GETFD)      = 0
[pid 24904] fcntl64(1069, F_GETFD)      = 0
[pid 24904] fcntl64(1071, F_GETFD)      = 0
[pid 24904] fcntl64(1075, F_GETFD)      = 0
[pid 24904] fcntl64(1096, F_GETFD)      = 0
[pid 24904] fcntl64(1097, F_GETFD)      = 0
[pid 24904] fcntl64(1098, F_GETFD)      = 0
[pid 24904] fcntl64(1099, F_GETFD)      = 0
[pid 24904] fcntl64(1100, F_GETFD)      = 0
[pid 24904] fcntl64(1102, F_GETFD)      = 0
[pid 24904] fcntl64(1104, F_GETFD)      = 0
[pid 24904] fcntl64(1105, F_GETFD)      = 0
[pid 24904] fcntl64(1109, F_GETFD)      = 0
[pid 24904] fcntl64(1110, F_GETFD)      = 0
[pid 24904] fcntl64(1112, F_GETFD)      = 0
[pid 24904] fcntl64(1113, F_GETFD)      = 0
[pid 24904] fcntl64(1114, F_GETFD)      = 0
[pid 24904] fcntl64(1116, F_GETFD)      = 0
[pid 24904] fcntl64(1117, F_GETFD)      = 0
[pid 24904] fcntl64(1119, F_GETFD)      = 0
[pid 24904] fcntl64(1123, F_GETFD)      = 0
[pid 24904] fcntl64(1129, F_GETFD)      = 0
[pid 24904] fcntl64(1130, F_GETFD)      = 0
[pid 24904] fcntl64(1132, F_GETFD)      = 0
[pid 24904] fcntl64(1137, F_GETFD)      = 0
[pid 24904] fcntl64(1138, F_GETFD)      = 0
[pid 24904] fcntl64(1139, F_GETFD)      = 0
[pid 24904] fcntl64(1140, F_GETFD)      = 0
[pid 24904] fcntl64(1141, F_GETFD)      = 0
[pid 24904] fcntl64(1142, F_GETFD)      = 0
[pid 24904] fcntl64(1143, F_GETFD)      = 0
[pid 24904] fcntl64(1144, F_GETFD)      = 0
[pid 24904] fcntl64(1145, F_GETFD)      = 0
[pid 24904] fcntl64(1146, F_GETFD)      = 0
[pid 24904] fcntl64(1147, F_GETFD)      = 0
[pid 24904] fcntl64(1148, F_GETFD)      = 0
[pid 24904] fcntl64(1149, F_GETFD)      = -1 EBADF (Bad file descriptor)
[pid 24904] clock_gettime(CLOCK_MONOTONIC, {3918, 602718574}) = 0
[pid 24904] select(1150, [1025 1026 1033 1056 1057 1058 1059 1062 1064 1066 
1068 1071 1075 1096 1097 1098 1099 1100 1102 1104 1105 1109 1110 1112 1113 1114 
1116 1117 1119 1123 1129 1130 1132 1137 1138 1139 1140 1141 1142 1143 1144 1145 
1146 1147 1148 1149], [], [], {518, 562511}) = -1 EBADF (Bad file descriptor)
[pid 24904] fcntl64(1025, F_GETFD)      = 0
[pid 24904] fcntl64(1026, F_GETFD)      = 0
[pid 24904] fcntl64(1033, F_GETFD)      = 0
[pid 24904] fcntl64(1057, F_GETFD)      = 0
[pid 24904] fcntl64(1059, F_GETFD)      = 0
[pid 24904] fcntl64(1062, F_GETFD)      = 0
[pid 24904] fcntl64(1064, F_GETFD)      = 0
[pid 24904] fcntl64(1066, F_GETFD)      = 0
[pid 24904] fcntl64(1068, F_GETFD)      = 0
[pid 24904] fcntl64(1071, F_GETFD)      = 0
[pid 24904] fcntl64(1075, F_GETFD)      = 0
[pid 24904] fcntl64(1096, F_GETFD)      = 0
[pid 24904] fcntl64(1097, F_GETFD)      = 0
[pid 24904] fcntl64(1098, F_GETFD)      = 0
[pid 24904] fcntl64(1099, F_GETFD)      = 0
[pid 24904] fcntl64(1100, F_GETFD)      = 0
[pid 24904] fcntl64(1102, F_GETFD)      = 0
[pid 24904] fcntl64(1104, F_GETFD)      = 0
[pid 24904] fcntl64(1105, F_GETFD)      = 0
[pid 24904] fcntl64(1109, F_GETFD^C <unfinished ...>



-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.38-rc6-686 (SMP w/1 CPU core)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages libdpkg-ruby1.8 depends on:
ii  apt [libapt-pkg4.10]         0.8.11.5    Advanced front-end for dpkg
ii  libc6                        2.11.2-2    Embedded GNU C Library: Shared lib
ii  libruby1.8                   1.8.7.302-2 Libraries necessary to run Ruby 1.

libdpkg-ruby1.8 recommends no packages.

libdpkg-ruby1.8 suggests no packages.

-- no debconf information

-- 
Die Menschen werden an sich und andern irre, weil sie die Mittel 
als Zweck behandeln, da denn vor lauter Tätigkeit gar nichts 
geschieht oder vielleicht gar das Widerwärtige.
                -- Goethe, Maximen und Reflektionen, Nr. 39

-- 
<LGS> Halloechen, ihr Spinner, so frueh auf?
<nusse> nein, wir schlafen alle im kollektiv
<knorke> mein alkoven ist kaputt
<teq> alkohol kaputt?



--- End Message ---
--- Begin Message ---
Hi,

On Sun, Feb 27, 2011 at 01:06:42PM +0100, Eduard Bloch wrote:
> Package: libdpkg-ruby1.8
> Version: 0.3.6+nmu1
> Severity: important
> 
> Hi, this problem is related to 585448 but is not quite the same. Even
> after increasing the file descriptor limit, apt-listbugs seems to hang
> in the next stage.
> 
> It looks like the select call includes some bad file descriptors and the
> loop does not handle EBADF properly. It simply keeps looping.
> Furthermore, the process does not respond to SIGTERM anymore (or
> whatever apt-listbugs uses to send a termination hint internally). Only
> kill -9 helps.
> 

It is not doing any select calls directly. In fact, off the top of my
head, I can't think of any place where the code is working with
multiple files at once.

If a EBADF happened in response to something this code is doing, I
would expect ruby to raise a Errno::EBADF exception. Unless it's
"rescue"ing this (which it's not), the error should be sent to the
caller, and eventually the user if still not caught.

> And another thing: what is this fcntl orgy, why do you need the
> gazillions of fcntls? Cannot this be done in a faster, less
> cpu-consuming way, like setting the flags once and remember the state of
> the file descriptors?
> 

Any fcntl orgy that may be happening is ruby's. All of the code in this
library is high level and uses the ruby standard library to do IO.

Anyways, this is probably fixed by the fix to #585448 (which I'll
upload later today) and the apt-listbugs change so it doesn't even use
that part of the code anymore.  So I'm closing the bug. If there's
still a problem, please reopen (preferably with a test case involving
only dpkg-ruby, so that the problem can be reproduced).

Cheers,
Ryan

Attachment: signature.asc
Description: Digital signature


--- End Message ---

Reply via email to