fails to start pcmcia if pcmcia_core is already loaded

Bug #6914 reported by Debian Bug Importer
4
Affects Status Importance Assigned to Milestone
pcmcia-cs (Debian)
Fix Released
Unknown
pcmcia-cs (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Automatically imported from Debian bug report #257191 http://bugs.debian.org/257191

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Automatically imported from Debian bug report #257191 http://bugs.debian.org/257191

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Thu, 1 Jul 2004 15:36:47 -0400
From: Joey Hess <email address hidden>
To: Debian Bug Tracking System <email address hidden>
Subject: fails to start pcmcia if pcmcia_core is already loaded

--6c2NcOVqGQ03X4Wi
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Package: pcmcia-cs
Version: 3.2.5-6
Severity: grave
Tags: d-i

Pcmcia (at least non-cardbus pcmcia; I have no cardbus cards) no longer
works on my laptop in d-i. It worked ok baxck in tc1.

I think what is going on is that disocver1-data has learned to load
yenta_socket for my cardbus. Loading that pulls in pcmcia_core. Then
the init script is started, but it is not very robust (or idempotent),
and fails to load ds or start cardmgr if pcmcia_core is already loaded.

So systems whose cardbus bridge is detected by discover will not work
for regular pcmcia anymore. This seems bad.

Since pcmcia_core can be loaded legitimatly by other things than the
pcmcia init script, the init script should handle the case there it is
already loaded.

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.4.26
Locale: LANG=3Den_US, LC_CTYPE=3Den_US

Versions of packages pcmcia-cs depends on:
ii debconf 1.4.29 Debian configuration managemen=
t sy
ii libc6 2.3.2.ds1-13 GNU C Library: Shared librarie=
s an
ii module-init-tools 3.1-pre2-2 tools for managing Linux kerne=
l mo
ii modutils 2.4.26-1 Linux module utilities
ii psmisc 21.5-1 Utilities that use the proc fi=
lesy

-- debconf information:
  pcmcia-cs/abort_upgrade: true
  pcmcia-cs/error_stopping:
  pcmcia-cs/abort_msg:
  pcmcia-cs/not_stopped:
  pcmcia-cs/fix_pcic: false
  pcmcia-cs/upgrade_note:
  pcmcia-cs/no_rmdir:
  pcmcia-cs/start_later:
* pcmcia-cs/upgrade_action: ask
* pcmcia-cs/start_pcmcia: true
  pcmcia-cs/stop_pcmcia: true
  pcmcia-cs/run_probe: true

--=20
see shy jo

--6c2NcOVqGQ03X4Wi
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFA5GfOd8HHehbQuO8RAt8HAJ0XKX/OM/I6avI/17He7Du4oCWVzQCglcHL
rhuEYL24AUSMyGKFQw0/RG4=
=wMMR
-----END PGP SIGNATURE-----

--6c2NcOVqGQ03X4Wi--

Revision history for this message
In , Thomas Hood (jdthood-aglu) wrote : Initscript error handling needs improvement

The problem appears to be that the busybox modprobe returns a
nonzero status if the modules is already loaded. This is a bug
in busybox's modprobe IMHO. However, /etc/init.d/pcmcia should
handle errors a bit more usefully than by means of "|| break".
--
Thomas

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-Id: <1088717145.1985.16.camel@thanatos>
Date: Thu, 01 Jul 2004 23:25:46 +0200
From: Thomas Hood <email address hidden>
To: <email address hidden>
Subject: Initscript error handling needs improvement

The problem appears to be that the busybox modprobe returns a
nonzero status if the modules is already loaded. This is a bug
in busybox's modprobe IMHO. However, /etc/init.d/pcmcia should
handle errors a bit more usefully than by means of "|| break".
--
Thomas

Revision history for this message
In , Per Olofsson (pelle) wrote : Re: Bug#257191: Initscript error handling needs improvement

On Thu, Jul 01, 2004 at 23:25 +0200, Thomas Hood wrote:
> The problem appears to be that the busybox modprobe returns a
> nonzero status if the modules is already loaded. This is a bug
> in busybox's modprobe IMHO. However, /etc/init.d/pcmcia should
> handle errors a bit more usefully than by means of "|| break".

I think the break stuff is there because it is presumed that modprobe
will print an error message if it fails, so there's no need for the
script to do that. Do you think the script should print an error
message as well?

--
Pelle

Revision history for this message
In , Per Olofsson (pelle) wrote : Re: Bug#257191: fails to start pcmcia if pcmcia_core is already loaded

On Thu, Jul 01, 2004 at 15:36 -0400, Joey Hess wrote:
> I think what is going on is that disocver1-data has learned to load
> yenta_socket for my cardbus. Loading that pulls in pcmcia_core. Then
> the init script is started, but it is not very robust (or idempotent),
> and fails to load ds or start cardmgr if pcmcia_core is already loaded.

The problem seems to be that busybox's modprobe returns an error if a
module is already loaded. modprobe from module-init-tools and modutils
does not have this behaviour. But I can fix it in the init script if
it's difficult or undesirable to do it in busybox.

--
Pelle

Revision history for this message
In , Joey Hess (joeyh) wrote :

Per Olofsson wrote:
> On Thu, Jul 01, 2004 at 15:36 -0400, Joey Hess wrote:
> > I think what is going on is that disocver1-data has learned to load
> > yenta_socket for my cardbus. Loading that pulls in pcmcia_core. Then
> > the init script is started, but it is not very robust (or idempotent),
> > and fails to load ds or start cardmgr if pcmcia_core is already loaded.
>
> The problem seems to be that busybox's modprobe returns an error if a
> module is already loaded. modprobe from module-init-tools and modutils
> does not have this behaviour. But I can fix it in the init script if
> it's difficult or undesirable to do it in busybox.

Yes, I filed bug #257201 on busybox about this. I do think fixing
busybox is the best solution, but since this does prevent a lot of
pcmcia hardware from being usable in the installer, and for all I know
we have code that depends on the current modprobe behavior, I'd
appreciate a quick fix if possible.

--
see shy jo

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Fri, 2 Jul 2004 12:18:05 +0200
From: Per Olofsson <email address hidden>
To: Thomas Hood <email address hidden>, <email address hidden>
Subject: Re: Bug#257191: Initscript error handling needs improvement

On Thu, Jul 01, 2004 at 23:25 +0200, Thomas Hood wrote:
> The problem appears to be that the busybox modprobe returns a
> nonzero status if the modules is already loaded. This is a bug
> in busybox's modprobe IMHO. However, /etc/init.d/pcmcia should
> handle errors a bit more usefully than by means of "|| break".

I think the break stuff is there because it is presumed that modprobe
will print an error message if it fails, so there's no need for the
script to do that. Do you think the script should print an error
message as well?

--
Pelle

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Fri, 2 Jul 2004 12:14:56 +0200
From: Per Olofsson <email address hidden>
To: Joey Hess <email address hidden>, <email address hidden>
Subject: Re: Bug#257191: fails to start pcmcia if pcmcia_core is already loaded

On Thu, Jul 01, 2004 at 15:36 -0400, Joey Hess wrote:
> I think what is going on is that disocver1-data has learned to load
> yenta_socket for my cardbus. Loading that pulls in pcmcia_core. Then
> the init script is started, but it is not very robust (or idempotent),
> and fails to load ds or start cardmgr if pcmcia_core is already loaded.

The problem seems to be that busybox's modprobe returns an error if a
module is already loaded. modprobe from module-init-tools and modutils
does not have this behaviour. But I can fix it in the init script if
it's difficult or undesirable to do it in busybox.

--
Pelle

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Fri, 2 Jul 2004 11:45:15 -0400
From: Joey Hess <email address hidden>
To: Per Olofsson <email address hidden>
Cc: <email address hidden>
Subject: Re: Bug#257191: fails to start pcmcia if pcmcia_core is already loaded

--qMm9M+Fa2AknHoGS
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Per Olofsson wrote:
> On Thu, Jul 01, 2004 at 15:36 -0400, Joey Hess wrote:
> > I think what is going on is that disocver1-data has learned to load
> > yenta_socket for my cardbus. Loading that pulls in pcmcia_core. Then
> > the init script is started, but it is not very robust (or idempotent),
> > and fails to load ds or start cardmgr if pcmcia_core is already loaded.
>=20
> The problem seems to be that busybox's modprobe returns an error if a
> module is already loaded. modprobe from module-init-tools and modutils
> does not have this behaviour. But I can fix it in the init script if
> it's difficult or undesirable to do it in busybox.

Yes, I filed bug #257201 on busybox about this. I do think fixing
busybox is the best solution, but since this does prevent a lot of
pcmcia hardware from being usable in the installer, and for all I know
we have code that depends on the current modprobe behavior, I'd
appreciate a quick fix if possible.

--=20
see shy jo

--qMm9M+Fa2AknHoGS
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFA5YMKd8HHehbQuO8RAqVvAJ0XVHVvAyAQgmjpA2OatB+sAbLxMgCfSRj6
K9R5hpA0Ol/4t7RXbHAnga0=
=Vr8O
-----END PGP SIGNATURE-----

--qMm9M+Fa2AknHoGS--

Revision history for this message
In , Thomas Hood (jdthood-aglu) wrote : Re: Bug#257191: Initscript error handling needs improvement

On Fri, 2004-07-02 at 12:18, Per Olofsson wrote:
> I think the break stuff is there because it is presumed that modprobe
> will print an error message if it fails, so there's no need for the
> script to do that. Do you think the script should print an error
> message as well?

I think it would be helpful if the script reported that it was
exiting due to an error. This may not really be necessary though:
joeyh has filed a bug report against busybox-cvs asking that its
modprobe have the same return values as the standard modprobe.

--
Thomas

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-Id: <1088790781.24841.57.camel@thanatos>
Date: Fri, 02 Jul 2004 19:53:02 +0200
From: Thomas Hood <email address hidden>
To: Per Olofsson <email address hidden>
Cc: <email address hidden>
Subject: Re: Bug#257191: Initscript error handling needs improvement

On Fri, 2004-07-02 at 12:18, Per Olofsson wrote:
> I think the break stuff is there because it is presumed that modprobe
> will print an error message if it fails, so there's no need for the
> script to do that. Do you think the script should print an error
> message as well?

I think it would be helpful if the script reported that it was
exiting due to an error. This may not really be necessary though:
joeyh has filed a bug report against busybox-cvs asking that its
modprobe have the same return values as the standard modprobe.

--
Thomas

Revision history for this message
In , Thomas Hood (jdthood-yahoo) wrote : Working around busybox modprobe problem

> I do think fixing
> busybox is the best solution, but since this does prevent a lot of
> pcmcia hardware from being usable in the installer, and for all I know
> we have code that depends on the current modprobe behavior, I'd
> appreciate a quick fix if possible.

If a workaround has to be hacked into the initscript then I suggest the
following technique:

     fail_on_modprobe() { echo "Drat, $1 failed to load" >&2 ; exit 1 ; }
     is_already_loaded() { grep -q "^$1" /proc/modules ; }
     modprobe foo || is_already_loaded foo || fail_on_modprobe foo

--
Thomas

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Sat, 3 Jul 2004 07:54:58 +0200
From: <email address hidden> (Thomas Hood)
To: Per Olofsson <email address hidden>
Cc: <email address hidden>, <email address hidden>
Subject: Working around busybox modprobe problem

> I do think fixing
> busybox is the best solution, but since this does prevent a lot of
> pcmcia hardware from being usable in the installer, and for all I know
> we have code that depends on the current modprobe behavior, I'd
> appreciate a quick fix if possible.

If a workaround has to be hacked into the initscript then I suggest the
following technique:

     fail_on_modprobe() { echo "Drat, $1 failed to load" >&2 ; exit 1 ; }
     is_already_loaded() { grep -q "^$1" /proc/modules ; }
     modprobe foo || is_already_loaded foo || fail_on_modprobe foo

--
Thomas

Revision history for this message
In , Per Olofsson (pelle) wrote :

On Sat, Jul 03, 2004 at 07:54 +0200, Thomas Hood wrote:
> If a workaround has to be hacked into the initscript then I suggest the
> following technique:
>
> fail_on_modprobe() { echo "Drat, $1 failed to load" >&2 ; exit
> 1 ; }

I've never heard of "drat", is it a British curse word? :)

> is_already_loaded() { grep -q "^$1" /proc/modules ; }

Better grep for "^$1 " here, or it could match other modules beginning
with $1.

Otherwise, thanks, I will use this.

--
Pelle

Revision history for this message
In , Per Olofsson (pelle) wrote : Bug#257191: fixed in pcmcia-cs 3.2.5-7

Source: pcmcia-cs
Source-Version: 3.2.5-7

We believe that the bug you reported is fixed in the latest version of
pcmcia-cs, which is due to be installed in the Debian FTP archive:

pcmcia-cs-udeb_3.2.5-7_i386.udeb
  to pool/main/p/pcmcia-cs/pcmcia-cs-udeb_3.2.5-7_i386.udeb
pcmcia-cs_3.2.5-7.diff.gz
  to pool/main/p/pcmcia-cs/pcmcia-cs_3.2.5-7.diff.gz
pcmcia-cs_3.2.5-7.dsc
  to pool/main/p/pcmcia-cs/pcmcia-cs_3.2.5-7.dsc
pcmcia-cs_3.2.5-7_i386.deb
  to pool/main/p/pcmcia-cs/pcmcia-cs_3.2.5-7_i386.deb
pcmcia-source_3.2.5-7_all.deb
  to pool/main/p/pcmcia-cs/pcmcia-source_3.2.5-7_all.deb

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to <email address hidden>,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Per Olofsson <email address hidden> (supplier of updated pcmcia-cs package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing <email address hidden>)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Sun, 4 Jul 2004 18:11:25 +0200
Source: pcmcia-cs
Binary: pcmcia-source pcmcia-cs-udeb pcmcia-cs
Architecture: source i386 all
Version: 3.2.5-7
Distribution: unstable
Urgency: low
Maintainer: Per Olofsson <email address hidden>
Changed-By: Per Olofsson <email address hidden>
Description:
 pcmcia-cs - PCMCIA Card Services for Linux
 pcmcia-cs-udeb - PCMCIA Card Services for Linux (udeb) (udeb)
 pcmcia-source - PCMCIA Card Services source
Closes: 254023 257191
Changes:
 pcmcia-cs (3.2.5-7) unstable; urgency=low
 .
   * Simplified the config.opts for powerpc to allow modification by d-i.
   * Removed hack which appended stuff to the copyright file.
   * Use i82365 as the default if pcic_probe fails. Since yenta_socket
     bridges are PCI, they should always be detectable (but pcic_probe
     could be smarter here and use the class ID).
   * Cope with busybox by checking if the module is already loaded if
     modprobe fails. Thanks to Thomas Hood for help. Closes: #257191.
   * Some cleanup of the init script, removed insmod cruft.
   * Recommend hotplug instead of only suggesting it.
   * Use Architecture: any, no need to list them individually.
   * Updated debconf template translations:
     - Hebrew (he.po) by Lior Kaplan. Closes: #254023.
Files:
 c55a7ee095056af37df7b75317702f7a 604 base extra pcmcia-cs_3.2.5-7.dsc
 873db05ba2923cd7e6a4cbc37d4c77b3 222991 base extra pcmcia-cs_3.2.5-7.diff.gz
 d44625aaa50d4f79436bd5c3999e54bc 1173348 admin extra pcmcia-source_3.2.5-7_all.deb
 bef80c0c2852fa3d13f854c779fd8bc3 324696 base extra pcmcia-cs_3.2.5-7_i386.deb
 21b13a490939cd4cda5b671399641c74 45990 debian-installer extra pcmcia-cs-udeb_3.2.5-7_i386.udeb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFA6FoN2tp5zXiKP0wRAt1cAKC9YrJwHYnp9SXrXG0h/RDjwJ7c4wCfUOXG
ip54IYezwkOGGyCjDcHjmE0=
=pCVq
-----END PGP SIGNATURE-----

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Sun, 4 Jul 2004 00:22:17 +0200
From: Per Olofsson <email address hidden>
To: Thomas Hood <email address hidden>
Cc: <email address hidden>, <email address hidden>
Subject: Re: Working around busybox modprobe problem

On Sat, Jul 03, 2004 at 07:54 +0200, Thomas Hood wrote:
> If a workaround has to be hacked into the initscript then I suggest the
> following technique:
>
> fail_on_modprobe() { echo "Drat, $1 failed to load" >&2 ; exit
> 1 ; }

I've never heard of "drat", is it a British curse word? :)

> is_already_loaded() { grep -q "^$1" /proc/modules ; }

Better grep for "^$1 " here, or it could match other modules beginning
with $1.

Otherwise, thanks, I will use this.

--
Pelle

Revision history for this message
Debian Bug Importer (debzilla) wrote :
Download full text (3.2 KiB)

Message-Id: <email address hidden>
Date: Sun, 04 Jul 2004 15:32:19 -0400
From: Per Olofsson <email address hidden>
To: <email address hidden>
Subject: Bug#257191: fixed in pcmcia-cs 3.2.5-7

Source: pcmcia-cs
Source-Version: 3.2.5-7

We believe that the bug you reported is fixed in the latest version of
pcmcia-cs, which is due to be installed in the Debian FTP archive:

pcmcia-cs-udeb_3.2.5-7_i386.udeb
  to pool/main/p/pcmcia-cs/pcmcia-cs-udeb_3.2.5-7_i386.udeb
pcmcia-cs_3.2.5-7.diff.gz
  to pool/main/p/pcmcia-cs/pcmcia-cs_3.2.5-7.diff.gz
pcmcia-cs_3.2.5-7.dsc
  to pool/main/p/pcmcia-cs/pcmcia-cs_3.2.5-7.dsc
pcmcia-cs_3.2.5-7_i386.deb
  to pool/main/p/pcmcia-cs/pcmcia-cs_3.2.5-7_i386.deb
pcmcia-source_3.2.5-7_all.deb
  to pool/main/p/pcmcia-cs/pcmcia-source_3.2.5-7_all.deb

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to <email address hidden>,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Per Olofsson <email address hidden> (supplier of updated pcmcia-cs package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing <email address hidden>)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Sun, 4 Jul 2004 18:11:25 +0200
Source: pcmcia-cs
Binary: pcmcia-source pcmcia-cs-udeb pcmcia-cs
Architecture: source i386 all
Version: 3.2.5-7
Distribution: unstable
Urgency: low
Maintainer: Per Olofsson <email address hidden>
Changed-By: Per Olofsson <email address hidden>
Description:
 pcmcia-cs - PCMCIA Card Services for Linux
 pcmcia-cs-udeb - PCMCIA Card Services for Linux (udeb) (udeb)
 pcmcia-source - PCMCIA Card Services source
Closes: 254023 257191
Changes:
 pcmcia-cs (3.2.5-7) unstable; urgency=low
 .
   * Simplified the config.opts for powerpc to allow modification by d-i.
   * Removed hack which appended stuff to the copyright file.
   * Use i82365 as the default if pcic_probe fails. Since yenta_socket
     bridges are PCI, they should always be detectable (but pcic_probe
     could be smarter here and use the class ID).
   * Cope with busybox by checking if the module is already loaded if
     modprobe fails. Thanks to Thomas Hood for help. Closes: #257191.
   * Some cleanup of the init script, removed insmod cruft.
   * Recommend hotplug instead of only suggesting it.
   * Use Architecture: any, no need to list them individually.
   * Updated debconf template translations:
     - Hebrew (he.po) by Lior Kaplan. Closes: #254023.
Files:
 c55a7ee095056af37df7b75317702f7a 604 base extra pcmcia-cs_3.2.5-7.dsc
 873db05ba2923cd7e6a4cbc37d4c77b3 222991 base extra pcmcia-cs_3.2.5-7.diff.gz
 d44625aaa50d4f79436bd5c3999e54bc 1173348 admin extra pcmcia-source_3.2.5-7_all.deb
 bef80c0c2852fa3d13f854c779fd8bc3 324696 base extra pcmcia-cs_3.2.5-7_i386.deb
 21b13a490939cd4cda5b671399641c74 45990 debian-installer extra pcmcia-cs-udeb_3.2.5-7_i386.udeb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFA6FoN2...

Read more...

Revision history for this message
Matt Zimmerman (mdz) wrote :

Remove myself from all these CCs now that we have the warty-bugs mailing list

Revision history for this message
Matt Zimmerman (mdz) wrote :

Increase severity of RC bugs to major, now that we have other, non-RC bugs in
the list

Revision history for this message
Matt Zimmerman (mdz) wrote :

fixed via sync of 3.2.5-7

Changed in pcmcia-cs:
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.