time hangs or seg faults

2009-07-22 Thread rjustinwilliams
On one system, I have installed bash from one version to the next, from  
3.2.17 to 4.0.10. With each version, the built-in "time" command hangs.
On the same system, I have installed tcsh, and that one's built in time  
function works.


Previously, I thought it was a versioning issue, but, now I am not so sure.  
Anybody else run into this? Hopefully with a solution? Any files I should  
check permissions on, that time uses?


Thanks


time seg fault

2009-07-23 Thread rjustinwilliams

Hi all

I have, on a 64-bit system an issue with time hanging. I've installed  
multiple versions, one at a time, and gotten the same results on each  
version.


If I use tcsh, instead of bash, time works.

With bash 3.17, I got a seg fault; with the other versions up through 4.10,  
it just hangs and I have to go back in and kill it.


Any thoughts on where this might be breaking? Are there any files bash's  
time tries to use that I should check out?


Thanks
Justin


Re: Re: time seg fault

2009-07-23 Thread rjustinwilliams

time echo "bah"
time ls
time who

Running the commands without the time, they return results as close to  
instantly as I can think of, but, try to time them, in bash, and they all  
hang.
Time the same commands in tcsh, they come back near-instantly, with time  
readouts.


At first, I thought there was something with the version of bash, since a  
couple of other machines with differing versions do not exhibit this  
behavior, but, installing corresponding versions on this machine that is  
acting strangely made no difference. Have bounced through multiple versions  
with the same results - a hung command every time I try to time in bash.


On Jul 23, 2009 6:43am, pk  wrote:

rjustinwilli...@gmail.com wrote:





> Hi all



>



> I have, on a 64-bit system an issue with time hanging. I've installed



> multiple versions, one at a time, and gotten the same results on each



> version.



>



> If I use tcsh, instead of bash, time works.



>



> With bash 3.17, I got a seg fault; with the other versions up through



> 4.10, it just hangs and I have to go back in and kill it.



>



> Any thoughts on where this might be breaking? Are there any files bash's



> time tries to use that I should check out?





It's very difficult to tell without at least an idea of what you're trying



to do. Paste a snippet of the code or commands you are using.




Re: Re: time seg fault

2009-07-23 Thread rjustinwilliams
That makes sense. I was seeing a gentoo bug report that might indicate  
issues with hardened kernel (and/or version issue) and glibc's  
gettimeofday() function. That was filed for a different issue, but, found  
it interesting...

On Jul 23, 2009 2:22pm, Greg Wooledge  wrote:

On Thu, Jul 23, 2009 at 01:42:15PM -0400, Justin Williams wrote:



> Greg, you mentioned that it might be a build bug causing headaches.



> As the same build environment was used to build tcsh, and to


> (re)build/upgrade bash on this system, and tcsh's time works while  
bash's



> doesn, I'm curious where the idea comes from. I don't doubt it, but I'm



> curious what leads you to that.





Well, my initial diagnosis of "a problem with the build" is very general.



I just mean that the bash binary executable program is not a correct



compilation of the source code, either because of a compiler bug, or



any other really bizarre problem.





Then you showed this:





> >> > Attaching to program: /bin/bash, process 5647


> >> > linux-nat.c:988: internal-error: linux_nat_attach: Assertion `pid  
==



> >> GET_PID


> >> > (inferior_ptid) && WIFSTOPPED (status) && WSTOPSIG (status) ==  
SIGSTOP'



> >> > failed.



> >> > A problem internal to GDB has been detected,



> >> > further debugging may prove unreliable.





To which I responded:





> >> Maybe your libc is broken? Or your compiler, if all of these are



> >> self-compiled gentoo e-builds?





If both bash and gdb are showing unexplained problems, then I would



start looking at deeper levels for the problems -- C compiler, C library,



kernel, hardware.