Bug 135508 - open_sock(socket 2) failed: Bad file descriptor
Summary: open_sock(socket 2) failed: Bad file descriptor
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: pcmcia-cs
Version: 2
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Dave Jones
QA Contact:
URL:
Whiteboard:
: 134819 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-10-13 07:06 UTC by dexterthrowaway
Modified: 2015-01-04 22:10 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-01-05 15:48:57 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
'lsmod > before-pcmcia-cs' before loading pcmcia (2.01 KB, text/plain)
2004-10-14 05:41 UTC, dexterthrowaway
no flags Details
'lsmod > after-pcmcia-cs' after loading pcmcia (2.12 KB, text/plain)
2004-10-14 05:42 UTC, dexterthrowaway
no flags Details
Output of lsmod before starting pcmcia (1.78 KB, text/plain)
2004-11-09 19:54 UTC, Doran Barton
no flags Details
lsmod output after pcmcia is started (1.89 KB, text/plain)
2004-11-09 19:55 UTC, Doran Barton
no flags Details
Strace cardmgr for card 8480. (7.33 KB, text/plain)
2004-12-13 06:36 UTC, Fabien Degouet
no flags Details

Description dexterthrowaway 2004-10-13 07:06:55 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3)
Gecko/20040922

Description of problem:
Using a standard IBM Thinkpad T30 (2366-81A). Upon starting
/etc/rc.d/init.d/pcmcia results in following message:

Starting PCMCIA services: cardmgr[8085]: open_sock(socket 2) failed:
Bad file descriptor
cardmgr[8085]: watching 2 sockets
done.

Previous version (original that came with FC2 release) did not have
this error message.

Version-Release number of selected component (if applicable):
pcmcia-cs-3.2.7-1.8.2.1

How reproducible:
Always

Steps to Reproduce:
1. Update to pcmcia-cs-3.2.7-1.8.2.1
2. Start/Restart /etc/rc.d/init.d/pcmcia
3.
    

Actual Results:  'Bad file descriptor' message displays. Upon testing,
it *seems* that there is no problems in functionality. Used a D-Link
DWL-650+ using acx100 for testing though so I am unsure of reliability
of testing.

Expected Results:  Normal startup of cardmgr service.

Additional info:

Upon starting pcmcia, message in /var/log/messages:

Oct 13 15:05:46 portablepoch kernel: Linux Kernel Card Services
Oct 13 15:05:46 portablepoch kernel:   options:  [pci] [cardbus] [pm]
Oct 13 15:05:46 portablepoch kernel: PCI: Found IRQ 11 for device
0000:02:00.0
Oct 13 15:05:46 portablepoch kernel: PCI: Sharing IRQ 11 with 0000:00:1d.0
Oct 13 15:05:46 portablepoch kernel: PCI: Sharing IRQ 11 with 0000:01:00.0
Oct 13 15:05:46 portablepoch kernel: Yenta: CardBus bridge found at
0000:02:00.0 [1014:0512]
Oct 13 15:05:46 portablepoch kernel: Yenta: Using INTVAL to route CSC
interrupts to PCI
Oct 13 15:05:46 portablepoch kernel: Yenta: Routing CardBus interrupts
to PCI
Oct 13 15:05:46 portablepoch kernel: Yenta TI: socket 0000:02:00.0,
mfunc 0x01d21022, devctl 0x64
Oct 13 15:05:46 portablepoch kernel: Yenta: ISA IRQ mask 0x06f8, PCI
irq 11
Oct 13 15:05:46 portablepoch kernel: Socket status: 30000006
Oct 13 15:05:46 portablepoch kernel: PCI: Found IRQ 11 for device
0000:02:00.1
Oct 13 15:05:46 portablepoch kernel: PCI: Sharing IRQ 11 with 0000:00:1f.3
Oct 13 15:05:46 portablepoch kernel: PCI: Sharing IRQ 11 with 0000:00:1f.5
Oct 13 15:05:46 portablepoch kernel: PCI: Sharing IRQ 11 with 0000:00:1f.6
Oct 13 15:05:46 portablepoch kernel: Yenta: CardBus bridge found at
0000:02:00.1 [1014:0512]
Oct 13 15:05:46 portablepoch kernel: Yenta: Using INTVAL to route CSC
interrupts to PCI
Oct 13 15:05:46 portablepoch kernel: Yenta: Routing CardBus interrupts
to PCI
Oct 13 15:05:46 portablepoch kernel: Yenta TI: socket 0000:02:00.1,
mfunc 0x01d21022, devctl 0x64
Oct 13 15:05:46 portablepoch kernel: Yenta: ISA IRQ mask 0x06f8, PCI
irq 11
Oct 13 15:05:46 portablepoch kernel: Socket status: 30000006
Oct 13 15:05:47 portablepoch cardmgr[8438]: open_sock(socket 2)
failed: Bad file descriptor
Oct 13 15:05:47 portablepoch cardmgr[8438]: watching 2 sockets
Oct 13 15:05:47 portablepoch kernel: cs: IO port probe 0x0c00-0x0cff:
clean.
Oct 13 15:05:47 portablepoch kernel: cs: IO port probe 0x0100-0x04ff:
excluding 0x4d0-0x4d7
Oct 13 15:05:47 portablepoch kernel: cs: IO port probe 0x0a00-0x0aff:
clean.

/etc/sysconfig/pcmcia contains the following (stock from install):

PCMCIA=yes
PCIC=yenta_socket
PCIC_OPTS=
CORE_OPTS=

Comment 1 Bill Nottingham 2004-10-13 20:15:29 UTC
After starting, what is the output of lsmod?

Comment 2 dexterthrowaway 2004-10-14 05:37:40 UTC
I will be attaching 2 files, an lsmod before loading pcmcia, and after
loading pcmcia. The diff of both is:

1a2,4
> ds                     12869  4
> yenta_socket           15937  0
> pcmcia_core            51336  2 ds,yenta_socket

Comment 3 dexterthrowaway 2004-10-14 05:41:55 UTC
Created attachment 105181 [details]
'lsmod > before-pcmcia-cs' before loading pcmcia

Comment 4 dexterthrowaway 2004-10-14 05:42:39 UTC
Created attachment 105182 [details]
'lsmod > after-pcmcia-cs' after loading pcmcia

Comment 5 Josef Bacik 2004-10-30 17:27:01 UTC
I'm having similar issues with my roommates Averatec 3150.  There is a
possible hardware issue, because before with windows, whenever you
would bump the wireless card the system would freeze and need to be
power cycled.  After I installed FC2 i tested this, and the system
hung for a second, then posted a system wide message saying that IRQ
10 had been disabled.  It printed this in /var/log/messages

Oct 29 00:16:26 localhost kernel: irq 10: nobody cared! (screaming
interrupt?)
Oct 29 00:16:26 localhost kernel: Call Trace:
Oct 29 00:16:26 localhost kernel:  [<021070c9>] __report_bad_irq+0x2b/0x67
Oct 29 00:16:26 localhost kernel:  [<02107161>] note_interrupt+0x43/0x66
Oct 29 00:16:26 localhost kernel:  [<02107327>] do_IRQ+0x109/0x169
Oct 29 00:16:26 localhost kernel:  [<0211af64>] __do_softirq+0x2c/0x73
Oct 29 00:16:26 localhost kernel:  [<021078f5>] do_softirq+0x46/0x4d
Oct 29 00:16:26 localhost kernel:  =======================
Oct 29 00:16:26 localhost kernel:  [<0210737b>] do_IRQ+0x15d/0x169
Oct 29 00:16:26 localhost kernel:  [<021b2194>]
acpi_processor_idle+0x12a/0x1c5
Oct 29 00:16:26 localhost kernel:  [<0210408c>] cpu_idle+0x1f/0x34
Oct 29 00:16:26 localhost kernel:  [<02318612>] start_kernel+0x174/0x176
Oct 29 00:16:26 localhost kernel: 
Oct 29 00:16:26 localhost kernel: handlers:
Oct 29 00:16:26 localhost kernel: [<108856cf>]
(yenta_interrupt+0x0/0x21 [yenta_socket])
Oct 29 00:16:26 localhost kernel: [<109fd347>]
(snd_via82xx_interrupt+0x0/0x76 [snd_via82xx])
Oct 29 00:16:26 localhost kernel: [<10c5265e>] (ndis_irq_th+0x0/0x8c
[ndiswrapper])
Oct 29 00:16:26 localhost kernel: Disabling IRQ #10

Yes, i know ndiswrapper is not supported and all that lovely stuff,
but I don't beleive this to be a ndiswrapper issue.  This card was
working fine until this point, and then after i power cycled I get
this message

Oct 30 12:43:41 localhost kernel: ndiswrapper version 0.11 loaded
(preempt=no,smp=no)
Oct 30 12:43:41 localhost kernel: ndiswrapper: driver bcmwl5
(Broadcom,06/13/2003, 3.20.23.0) added
Oct 30 12:43:41 localhost kernel: Linux Kernel Card Services
Oct 30 12:43:41 localhost kernel:   options:  [pci] [cardbus] [pm]
Oct 30 12:43:41 localhost kernel: ACPI: PCI interrupt 0000:00:0a.0[A]
-> GSI 10 (level, low) -> IRQ 10
Oct 30 12:43:41 localhost kernel: Yenta: CardBus bridge found at
0000:00:0a.0 [14ff:c602]
Oct 30 12:43:41 localhost kernel: Yenta: ISA IRQ mask 0x0038, PCI irq 10
Oct 30 12:43:41 localhost kernel: Socket status: 30000821
Oct 30 12:43:42 localhost pcmcia: cardmgr[1638]: open_sock(socket 1)
failed: Bad file descriptor
Oct 30 12:43:42 localhost cardmgr[1638]: open_sock(socket 1) failed:
Bad file descriptor
Oct 30 12:43:42 localhost cardmgr[1638]: watching 1 socket
Oct 30 12:43:42 localhost kernel: cs: IO port probe 0x0c00-0x0cff: clean.
Oct 30 12:43:42 localhost pcmcia: cardmgr[1638]: watching 1 socket
Oct 30 12:43:42 localhost kernel: cs: IO port probe 0x0100-0x04ff:
excluding 0x400-0x40f 0x4d0-0x4d7
Oct 30 12:43:42 localhost kernel: cs: IO port probe 0x0a00-0x0aff: clean.
Oct 30 12:43:42 localhost pcmcia: done.


now it says pcmcia: cardmgr[1638]: watching 1 socket, but whenever i
try to do anything with cardmgr it gives me a cardmgr[1638]:
open_sock(socket 1) failed: Bad file descriptor error.  The card no
longer functions normally, I've pretty much exhausted everything.  Now
this issue happened with the original fc2 kernel, but when i update to
the newest fc2 kernel the card worked again, and once again i decided
to see if you bumped the card if it would have a problem, and it did,
and I'm right back to where i started.  Any ideas?

Comment 6 James Perkins 2004-11-08 06:10:53 UTC
Same issue on Dell Inspiron D600 with Lucent Orinoco 802.11b PC-Card.
Boot hangs in pcmcia startup whether there is a card present or not.
Workaround: boot to single user and issue "chkconfig --del pcmcia";
reboot again and log in normally, then run "/etc/init.d/pcmcia start"
manually. Still get the error complaint with the Bad file descriptor
error, but it seems to recognize the installed card correctly.

Comment 7 Doran Barton 2004-11-09 19:39:31 UTC
I am having the same problem here with HP Pavilion zv5000z w/ x86_64 FC3.

Starting PCMCIA services: cardmgr[25075]: open_sock(socket 2) failed:
Bad file descriptor
cardmgr[25075]: watching 2 sockets
done.

Comment 8 Doran Barton 2004-11-09 19:54:18 UTC
Created attachment 106368 [details]
Output of lsmod before starting pcmcia

Comment 9 Doran Barton 2004-11-09 19:55:15 UTC
Created attachment 106369 [details]
lsmod output after pcmcia is started

Comment 10 Markus Berndt 2004-11-16 20:38:45 UTC
I am having the same problem (Thinkpad T41 2373GEU). When the laptop
boots, it hangs when starting the pcmcia service. The workaround
suggested in #6 helps. When starting pcmcia 'by hand' after the laptop
has booted, it hangs sometimes, too. When that happens, I can hit
CTRL-C and  then I get the error message described in #1
(open_sock...). After that, everything seems to work fine (I am using
a Linksys WPC11 prism based wifi card).

Comment 11 dexterthrowaway 2004-11-17 04:52:13 UTC
I don't know if this is related but I've gotten this error today in
/var/log/message:

Nov 17 12:46:48 portablepoch kernel: PCI: Enabling device 0000:07:00.0
(0000 -> 0003)
Nov 17 12:46:53 portablepoch wait_for_sysfs[4809]: either
wait_for_sysfs (udev 039) needs an update to handle the device
'/devices/pci0000:00/0000:00:1e.0/0000:02:00.1/0000:07:00.0' properly
(no bus device link) or the sysfs-support of your device's driver
needs to be fixed, please report to
<linux-hotplug-devel.net>
Nov 17 12:46:59 portablepoch kernel: acx_pci: probe of 0000:07:00.0
failed with error -5

This is strange as a few nights ago I was using my wireless without
any problems. Now I can't use it. It seems pcmcia is intermittently
working for me. I can see it seems to be udev/driver/hotplug related.
But running lspci and lspci -n shows that the hardware is detected.
lsmod shows that acx_pci is loaded as well. But the device is not
brought up. ifconfig wlan0 says Device not found.

Additional note... this is on FC3. pcmcia-cs-3.2.7-1.14. Should a new
bug report be filed? Or remain here and note that the open_sock error
is occuring on both FC2 and FC3?

Comment 12 Parag Warudkar 2004-12-04 01:41:39 UTC
Same problem - present with FC3 i386 - I have a Compaq Laptop and
WPC11 Linksys card. 

Comment 13 Fabien Degouet 2004-12-07 13:15:26 UTC
same problem on laptop compaq presario with Orinoco gold card
kernel 2.6.9-1.681_FC3 
pcmcia-cs-3.2.7-1.14
The card does not show up.

Comment 14 Bill Nottingham 2004-12-07 15:44:09 UTC
Can you get a strace of cardmgr?

Comment 15 Will Pearson 2004-12-08 02:06:40 UTC
I got the same problem on my Gateway Solo 9500.

When I /etc/init.d/pcmcia restart

I get the message:

Shutting down PCMCIA services: ERROR: Module ds is in use by orinoco_cs
ERROR: Module pcmcia_core is in use by orinoco_cs,yenta_socket,ds
done.
Starting PCMCIA services: cardmgr [6004]: open_sock(socket 2) failed:
Bad file descriptor
cardmgr[6004]: watching 2 sockets
done.

I upgraded from FC1 where my Actiontec wireless card was working fine
to FC3. Now it doesn't work at all.

Comment 16 Fawad Halim 2004-12-12 04:37:18 UTC
I'm getting the same error with a Lucent WaveLan card (using the
orinioco_cs driver). This error started occuring around a month ago.
The machine is Fedora Core 2.

Comment 17 Fabien Degouet 2004-12-13 06:36:08 UTC
Created attachment 108421 [details]
Strace cardmgr for card 8480.

Comment 22 Fabien Degouet 2004-12-27 08:40:36 UTC
Anything new? I think something is wrong with the hardware but it
seems to be specific to a latest update concerning FC2 o FC3. Please
let us know if someone has an idea concerning that problem as we
cannot use the PCMCIA slot (quite a big problem!). Happy christmas.

Comment 23 Bill Nottingham 2004-12-28 05:48:17 UTC
The error message is completely cosmetic. Any PCMCIA failures are
unrelated to the error message.

Comment 24 Fabien Degouet 2004-12-28 09:54:26 UTC
I understand that the error message may have nothing to do with the
failure but the point is that something make impossible to have the
pcmcia slot(s) working. I am not a specialist in driver/hardware
controller linux troubleshooting but the pcmcia slot looks like dead
and no restart or start seem to make it work. I have seen many guys
around looking for a way to have their wireless pcmcia card back to
work and till now it seems that the FC3 (and as I see FC2 too) have
this problem without a solution. 
What do we need to troubleshoot that and solve it? I sent a strace,
maybe we need something else? Look in what direction? I have the
problem and I could not figure out till now from where it comes from
but I really want to help and I could provide any trace you need.
Just let me know in order to have a FC3 stable and with functionality.


Comment 25 Bruno De Wolf 2004-12-29 07:45:31 UTC
For what it's worth: same symptoms here, though slightly different
error messages.

Symptom: pcmcia card (Linksys wireless lan) seems dead.
service pcmcia start reports the open_sock..bad file descriptor
message mentioned above.

OS: Fedora core 2, kernel 2.6.9-1.6_FC2
Hardware: NEC versa P700 laptop

Syslog extract
Dec 29 08:28:57 avon kernel: Linux Kernel Card Services
Dec 29 08:28:57 avon kernel:   options:  [pci] [cardbus] [pm]
Dec 29 08:28:57 avon kernel: ACPI: PCI interrupt 0000:02:07.0[A] ->
GSI 5 (level, low) -> IRQ 5
Dec 29 08:28:57 avon kernel: Yenta: CardBus bridge found at
0000:02:07.0 [1033:819a]
Dec 29 08:28:57 avon kernel: Yenta: Using CSCINT to route CSC
interrupts to PCI
Dec 29 08:28:57 avon kernel: Yenta: Routing CardBus interrupts to PCI
Dec 29 08:28:57 avon kernel: Yenta TI: socket 0000:02:07.0, mfunc
0x010c1022, devctl 0x64
Dec 29 08:28:57 avon kernel: Yenta TI: socket 0000:02:07.0 probing PCI
interrupt failed, trying to fix
Dec 29 08:28:57 avon kernel: Yenta TI: socket 0000:02:07.0 no PCI
interrupts. Fish. Please report.
Dec 29 08:28:57 avon kernel: Yenta: ISA IRQ mask 0x0000, PCI irq 0
Dec 29 08:28:57 avon kernel: Socket status: 00000000
Dec 29 08:28:57 avon kernel: ACPI: PCI interrupt 0000:02:07.1[A] ->
GSI 5 (level, low) -> IRQ 5
Dec 29 08:28:57 avon kernel: Yenta: CardBus bridge found at
0000:02:07.1 [1033:819a]
Dec 29 08:28:57 avon kernel: Yenta: Using CSCINT to route CSC
interrupts to PCI
Dec 29 08:28:57 avon kernel: Yenta: Routing CardBus interrupts to PCI
Dec 29 08:28:57 avon kernel: Yenta TI: socket 0000:02:07.1, mfunc
0x010c1022, devctl 0x64
Dec 29 08:28:57 avon kernel: Yenta TI: socket 0000:02:07.1 probing PCI
interrupt failed, trying to fix
Dec 29 08:28:57 avon kernel: Yenta TI: socket 0000:02:07.1 no PCI
interrupts. Fish. Please report.
Dec 29 08:28:58 avon kernel: Yenta: ISA IRQ mask 0x0000, PCI irq 0
Dec 29 08:28:58 avon kernel: Socket status: 00000000
Dec 29 08:28:58 avon cardmgr[3867]: open_sock(socket 2) failed: Bad
file descriptor
Dec 29 08:28:58 avon cardmgr[3867]: watching 2 sockets
Dec 29 08:28:58 avon kernel: cs: IO port probe 0x0c00-0x0cff: clean.
Dec 29 08:28:58 avon kernel: cs: IO port probe 0x0100-0x04ff:
excluding 0x4d0-0x4d7
Dec 29 08:28:58 avon kernel: cs: IO port probe 0x0a00-0x0aff: clean.
 
 
lspci: 
00:00.0 Host bridge: Intel Corp. 82845 845 (Brookdale) Chipset Host
Bridge (rev 04)
00:01.0 PCI bridge: Intel Corp. 82845 845 (Brookdale) Chipset AGP
Bridge (rev 04)
00:1e.0 PCI bridge: Intel Corp. 82801BAM/CAM PCI Bridge (rev 42)
00:1f.0 ISA bridge: Intel Corp. 82801CAM ISA Bridge (LPC) (rev 02)
00:1f.1 IDE interface: Intel Corp. 82801CAM IDE U100 (rev 02)
00:1f.3 SMBus: Intel Corp. 82801CA/CAM SMBus Controller (rev 02)
00:1f.5 Multimedia audio controller: Intel Corp. 82801CA/CAM AC'97
Audio Controller (rev 02)
00:1f.6 Modem: Intel Corp. 82801CA/CAM AC'97 Modem Controller (rev 02)
01:00.0 VGA compatible controller: ATI Technologies Inc Radeon
Mobility M7 LW [Radeon Mobility 7500]
02:05.0 USB Controller: NEC Corporation USB (rev 41)
02:05.1 USB Controller: NEC Corporation USB (rev 41)
02:05.2 USB Controller: NEC Corporation USB 2.0 (rev 02)
02:06.0 FireWire (IEEE 1394): NEC Corporation IEEE 1394 Host
Controller (rev 01)02:07.0 CardBus bridge: Texas Instruments PCI1520
PC card Cardbus Controller (rev 01)
02:07.1 CardBus bridge: Texas Instruments PCI1520 PC card Cardbus
Controller (rev 01)
02:08.0 Ethernet controller: Intel Corp. 82801CAM (ICH3) PRO/100 VE
(LOM) Ethernet Controller (rev 42)
 
Thanks for working on this issue.

Bruno

Comment 26 Fabien Degouet 2005-01-05 09:51:21 UTC
Bug solved with latest updates pcmcia-cs 3.2.7-2.1 and kernel
2.6.9-1.724_FC3.
I can now see pcmcia cards!! Now Fedora C3 really is the best distro
in the linux world. Thanks for your great job!!

Comment 27 Bill Nottingham 2005-06-28 19:30:07 UTC
*** Bug 134819 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.