Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
bash-3.1 - Don't go in the water!
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3  Next  
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
feardapenguin
Guru
Guru


Joined: 23 Jul 2003
Posts: 414
Location: Texas

PostPosted: Sun Dec 11, 2005 5:36 am    Post subject: bash-3.1 - Don't go in the water! Reply with quote

System's been running great. Rebooted earlier today with no trouble. Then later in the day I updated a few packages, rebooted, and found I no longer have net services. Boot gives me a bunch of these:

Code:
/lib/rcscripts/sh/rc-daemon.sh: line 328: syntax error near unexpected token `('
/lib/rcscripts/sh/rc-daemon.sh: line 328: `     local -a RC_DAEMONS=() RC_PIDFILES=()'

/var/log/everything/current shows the following. This example is for samba, but I get the same message on anything that relies on net.
Code:
Dec 10 23:09:40 [rc-scripts] ERROR:  "/etc/init.d/net.eth0" has syntax errors in it; aborting ...
Dec 10 23:09:40 [rc-scripts] ERROR:  Problem starting needed services.
Dec 10 23:09:40 [rc-scripts] "samba" was not started.


These are the updates I did after successfully rebooting earlier in the day. No other changes were made to the system:

mysql-5.0.16-r4
bash-3.1
readline-5.1
sdl-gfx-2.0.13-r1
libxklavier-2.0-r1
antlr-2.7.5-r1
fetchmail-6.3.0
nmap-3.95
elfutils-0.118
xerces-2.6.2-r2 (downgraded from xerces-2.7.1)

How is it possible that any of these could have borked my rc scripts?

The relevant section of /lib/rcscripts/sh/rc-daemon.sh reads as follows:
Code:
#323  Loads the service state file and ensures that all listed daemons are still
324 # running - hopefully on their correct pids too
325 # If not, we stop the service
326 update_service_status() {
327   local service="$1" daemonfile="${svcdir}/daemons/$1" i
328   local -a RC_DAEMONS=() RC_PIDFILES=()
329
330    # We only care about marking started services as stopped if the daemon(s)
331    # for it are no longer running
332    ! service_started "${service}" && return
333    [[ ! -f ${daemonfile} ]] && return

The only thing I wondered about is that trailing 'i' on line 327? Is that right?


Last edited by feardapenguin on Sun Dec 11, 2005 7:50 am; edited 2 times in total
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Sun Dec 11, 2005 6:17 am    Post subject: Reply with quote

The "i" is fine, because i is used in the "for" loop in line 338.

It sounds like bash 3.1 is broken.
Back to top
View user's profile Send private message
Rony
n00b
n00b


Joined: 12 Oct 2003
Posts: 20
Location: Hong Kong, China

PostPosted: Sun Dec 11, 2005 6:30 am    Post subject: Reply with quote

Same happened here, after I tried:

Code:
emerge =bash-3.0-r14


and my system is back :D

(was upgraded to bash-3.1)
Back to top
View user's profile Send private message
anxt
Apprentice
Apprentice


Joined: 25 Feb 2003
Posts: 254
Location: Frozen Tundra, Canada

PostPosted: Sun Dec 11, 2005 6:54 am    Post subject: Reply with quote

yep same problem happened to me
Back to top
View user's profile Send private message
nostabo
Apprentice
Apprentice


Joined: 15 Jun 2004
Posts: 201
Location: 38° 31' N 121° 30' W

PostPosted: Sun Dec 11, 2005 6:55 am    Post subject: Reply with quote

I dicked with my init scripts trying to figure this out, but this is a (major) issue with bash-3.1:
https://bugs.gentoo.org/show_bug.cgi?id=115150.

To fix this (as noted by Rony) downgrade to the previous stable version, in this case bash-3.0-r14.

And you can mark this one as SOLVED!
_________________
Registered Linux user number 362941
Get counted - http://counter.li.org/
Back to top
View user's profile Send private message
feardapenguin
Guru
Guru


Joined: 23 Jul 2003
Posts: 414
Location: Texas

PostPosted: Sun Dec 11, 2005 7:49 am    Post subject: Reply with quote

Downgrading bash did it. Should have realized it was the shell upgrade that broke the shell scripts. Duh.

3.1 is definitely hosed. Don't they test this stuff before they release it?
Back to top
View user's profile Send private message
HecHacker1
Apprentice
Apprentice


Joined: 26 Jun 2003
Posts: 213
Location: UCSD

PostPosted: Sun Dec 11, 2005 8:45 am    Post subject: Reply with quote

same problem here.. i had to comment out the offending lines in my net.eth0 and rc-daemon.sh in order to get back online in order to realize bash was the problem.

unfortunately, in rc-daemon.sh i deleted a line before I started commenting them out. What do I have to emerge to fix this?
Back to top
View user's profile Send private message
crudh
l33t
l33t


Joined: 12 May 2005
Posts: 696
Location: Sundbyberg, Sweden

PostPosted: Sun Dec 11, 2005 9:40 am    Post subject: Reply with quote

Thanks to all the posters in this thread, I had the same problem and downgrading bash solved it.
Back to top
View user's profile Send private message
fury
n00b
n00b


Joined: 01 May 2003
Posts: 34
Location: California

PostPosted: Sun Dec 11, 2005 9:41 am    Post subject: Reply with quote

Maybe this should be masked?

and...ehem...tested?

Pretty much prevented me from booting.
Back to top
View user's profile Send private message
crudh
l33t
l33t


Joined: 12 May 2005
Posts: 696
Location: Sundbyberg, Sweden

PostPosted: Sun Dec 11, 2005 9:47 am    Post subject: Reply with quote

fury wrote:
Maybe this should be masked?

and...ehem...tested?.


Agreed. But if you run ~x86 you got to accept some breakage :-)
Back to top
View user's profile Send private message
shtumpa
Tux's lil' helper
Tux's lil' helper


Joined: 19 Feb 2005
Posts: 136
Location: Australia

PostPosted: Sun Dec 11, 2005 10:36 am    Post subject: Reply with quote

Yep same problem happened to me aswell
Dropping back to "bash-3.0-r14" did the trick :-)

Code:
emerge =bash-3.0-r14


Thanks peoples :-)
Back to top
View user's profile Send private message
ecatmur
Advocate
Advocate


Joined: 20 Oct 2003
Posts: 3595
Location: Edinburgh

PostPosted: Sun Dec 11, 2005 12:17 pm    Post subject: Reply with quote

HecHacker1 wrote:
same problem here.. i had to comment out the offending lines in my net.eth0 and rc-daemon.sh in order to get back online in order to realize bash was the problem.

unfortunately, in rc-daemon.sh i deleted a line before I started commenting them out. What do I have to emerge to fix this?
sys-apps/baselayout.
_________________
No more cruft
dep: Revdeps that work
Using command-line ACCEPT_KEYWORDS?
Back to top
View user's profile Send private message
Lawless
l33t
l33t


Joined: 03 Nov 2003
Posts: 638
Location: Germany

PostPosted: Sun Dec 11, 2005 2:02 pm    Post subject: Reply with quote

You can also change the affected scripts by splitting up all 'local -a' statements with more than one array into several lines with only one array.

local -a provide=() provide_list=()
to
local -a provide=()
local -a provide_list=()

It's a parsing error in bash-3.1
_________________
Kernel panic: I have no root and I want to scream
Back to top
View user's profile Send private message
Pirf2
n00b
n00b


Joined: 30 Sep 2004
Posts: 4

PostPosted: Sun Dec 11, 2005 4:17 pm    Post subject: Reply with quote

I can also confirm this problem here. Thanks for your hints!
Back to top
View user's profile Send private message
feardapenguin
Guru
Guru


Joined: 23 Jul 2003
Posts: 414
Location: Texas

PostPosted: Sun Dec 11, 2005 6:01 pm    Post subject: Reply with quote

crudh wrote:
fury wrote:
Maybe this should be masked?

and...ehem...tested?.


Agreed. But if you run ~x86 you got to accept some breakage :-)

True, but some basic testing should occur before modules are released for public consumption, even to ~arch. In cases like bash the developer's 'unit/system' test scripts should always include a regression test of core init shell scripts.

I manage software testing for a large application at a Fortune 100 company. Generally, a release to ~arch would be considered an extended form of "integration testing" (actually, more like "user acceptance testing"). This type of fatal error should never get that far.

I realize that gentoo is a distributed development project and therefore does not have a fully dedicated testing team. I also realize that testing can never be 100%. But this only makes it more important for each core development group to have at least a basic testing checklist. I've seen too many fatal errors get released over the years to believe this occurs on a consistent basis.

Don't get me wrong... I am NOT bashing any particular developer. I think the gentoo team does a great job, especially given that this is an O/S environment supporting a full compliment of applications. Overall, gentoo is a well-developed, mature product. But I also think that unit and system testing could be made more robust.
Back to top
View user's profile Send private message
omp
Retired Dev
Retired Dev


Joined: 10 Sep 2005
Posts: 1018
Location: Glendale, California

PostPosted: Sun Dec 11, 2005 6:07 pm    Post subject: Reply with quote

Same problem. Thanks guys :)
_________________
meow.
Back to top
View user's profile Send private message
crudh
l33t
l33t


Joined: 12 May 2005
Posts: 696
Location: Sundbyberg, Sweden

PostPosted: Sun Dec 11, 2005 7:17 pm    Post subject: Reply with quote

feardapenguin wrote:

True, but some basic testing should occur before modules are released for public consumption, even to ~arch. In cases like bash the developer's 'unit/system' test scripts should always include a regression test of core init shell scripts.
.


That's why I said I agreed. Such an important package as bash should at least have been at least reboot tested by a few before putting in it in ~arch. But at the same time running a full system on ~arch isn't recommended, so by doing so I accept every breakage Gentoo throws at me. I'm just glad there are people here on the forums that can help when it goes to hell ;)

So I think we agree, the Gentoo devs does a good job but some more testing procedures wouldn't hurt. At least not us users, hehe.
Back to top
View user's profile Send private message
VeXocide
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jul 2004
Posts: 131
Location: Netherlands, the

PostPosted: Sun Dec 11, 2005 7:24 pm    Post subject: Reply with quote

Jup, same 'ere
Back to top
View user's profile Send private message
nando
n00b
n00b


Joined: 20 Jul 2005
Posts: 7

PostPosted: Sun Dec 11, 2005 7:34 pm    Post subject: Reply with quote

I pulled out all the =() in my scripts and things worked again without downgrading. Of course had eth0 worked, I could have just checked the forums and known to downgrade... ;)
Back to top
View user's profile Send private message
ciaranm
Retired Dev
Retired Dev


Joined: 19 Jul 2003
Posts: 1719
Location: In Hiding

PostPosted: Sun Dec 11, 2005 8:36 pm    Post subject: Reply with quote

What's this? People are running ~arch and then complaining when they hit the occasional breakage again? Maybe the solution is to break more stuff in ~arch, so that fewer people who don't understand what they're doing use it...
Back to top
View user's profile Send private message
phixth
n00b
n00b


Joined: 24 Apr 2005
Posts: 30

PostPosted: Sun Dec 11, 2005 8:54 pm    Post subject: re Reply with quote

thank you, thank you , thank you guys. I had this problem too, now it's solved. 8)
Back to top
View user's profile Send private message
MerlinTheWizard
Apprentice
Apprentice


Joined: 06 Apr 2003
Posts: 270

PostPosted: Sun Dec 11, 2005 9:34 pm    Post subject: Reply with quote

Had the same problem.

crudh wrote:
fury wrote:
Maybe this should be masked?

and...ehem...tested?.


Agreed. But if you run ~x86 you got to accept some breakage :-)


Yes, but to some reasonable extent.
Releasing a buggy version of some package on ~x86 is acceptable. Releasing a version that will prevent your system from being usable with obvious bugs (that everyone is running into, not a "random", difficult-to-reproduce bug at all) is not IMO.
Back to top
View user's profile Send private message
feardapenguin
Guru
Guru


Joined: 23 Jul 2003
Posts: 414
Location: Texas

PostPosted: Sun Dec 11, 2005 9:41 pm    Post subject: Reply with quote

crudh wrote:
But at the same time running a full system on ~arch isn't recommended, so by doing so I accept every breakage Gentoo throws at me.

No argument there. Those of us who do run ~arch knowingly accept the risk. I used to get a kick out of debugging issues but lately I just don't have the time for it. Too bad there isn't an easy path out of the ~arch world short of downgrading 99% of the system. I'd probably make the jump back to stable.

Oh... and to the snide developer who posted: Have a nice day. 8)
Back to top
View user's profile Send private message
fury
n00b
n00b


Joined: 01 May 2003
Posts: 34
Location: California

PostPosted: Sun Dec 11, 2005 10:11 pm    Post subject: Reply with quote

ciaranm wrote:
What's this? People are running ~arch and then complaining when they hit the occasional breakage again? Maybe the solution is to break more stuff in ~arch, so that fewer people who don't understand what they're doing use it...


I can only speak for myself, but since my comment (which was made in the middle of the night after some frustration), triggered this little debate I'll speak to it.

I certainly am not complaining because ~arch isn't stable enough. It's unstable, and it's around to catch bugs (such as this one). But it's not a substitute for testing packages, either. The fact is, people DO use ~arch, and it's irresponsible to add a package that totally borks a system when it could have been prevented by simply reboot-testing it (bash is a core peice of software).

"Break[ing] more stuff in ~arch" isn't something I'd expect a Dev to say, "Fixing more stuff in ~arch" is. I'm not a dev, so I came here to make sure ppl know about this issue before they emerge world, and when it was already here I added my frustrated 2c.

That said, it's a stupid bug that took some pondering on my part, and i'm certainly accustomed to it because I choose to run ~arch.
Back to top
View user's profile Send private message
ciaranm
Retired Dev
Retired Dev


Joined: 19 Jul 2003
Posts: 1719
Location: In Hiding

PostPosted: Sun Dec 11, 2005 10:21 pm    Post subject: Reply with quote

fury wrote:
I certainly am not complaining because ~arch isn't stable enough. It's unstable, and it's around to catch bugs (such as this one). But it's not a substitute for testing packages, either. The fact is, people DO use ~arch, and it's irresponsible to add a package that totally borks a system when it could have been prevented by simply reboot-testing it (bash is a core peice of software).

What makes you think bash-3.1 wasn't reboot-tested? It was. And as for irresponsible, that's like saying "I bought some hot coffee and got burned, so the coffee seller is irresponsible".
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum