threads / discuss / 13198

git-gui hangs on read

Subject: git-gui hangs on read

## tl;dr

12 messages between Apr 21, 2008 and Apr 25, 2008.

replies: 11people: 4as markdown or json

Benjamin Collins· Apr 21, 2008, 14:23 UTC · lore

I just upgraded a few machines (RHEL 4.4) to the latest stable, and git-gui stopped working. It just hangs forever if it's in a git repository. If it's not in a repository, it will open up the dialog that lets you create or open a repository. I'm not sure what's going on, but here's the tail end of the strace -f:

[pid 16903] open("/usr/share/aspell/standard.kbd", O_RDONLY) = 3 [pid 16903] fstat(3, {st_mode=S_IFREG|0644, st_size=100, ...}) = 0 [pid 16903] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2a983ce000 [pid 16903] read(3, "# Standard keyboard data file\n\nq"..., 4096) = 100 [pid 16903] read(3, "", 4096) = 0 [pid 16903] close(3) = 0 [pid 16903] munmap(0x2a983ce000, 4096) = 0 [pid 16903] fstat(1, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0 [pid 16903] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2a983ce000 [pid 16903] write(1, "@(#) International Ispell Versio"..., 68 <unfinished ...> [pid 16897] <... read resumed> "@(#) International Ispell Versio"..., 4096) = 68 [pid 16903] <... write resumed> ) = 68 [pid 16903] fstat(0, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0 [pid 16903] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2a983cf000 [pid 16903] read(0, <unfinished ...> [pid 16897] write(5, "!\n$$cr master\n", 14) = 14 [pid 16903] <... read resumed> "!\n$$cr master\n", 4096) = 14 [pid 16897] read(6, <unfinished ...> [pid 16903] read(0,

Has anyone seen this before? I wanted to get some other eyeballs on this before I dive into this rabbit hole.

-- 
Benjamin A. Collins <ben.collins@acm.org>
Benjamin Collins· Apr 21, 2008, 21:05 UTC · re: Benjamin Collins · lore

Re: git-gui hangs on read

On Mon, Apr 21, 2008 at 9:23 AM, Benjamin Collins <ben.collins@acm.org> wrote:
> I just upgraded a few machines (RHEL 4.4) to the latest stable, and
>  git-gui stopped working.  It just hangs forever if it's in a git
>  repository.

Still don't know what the deal is (no time to investigate, yet), but 1.5.4 doesn't have this issue.

-- 
Benjamin A. Collins <aggieben@gmail.com>
Shawn O. Pearce· Apr 22, 2008, 00:13 UTC · re: Benjamin Collins · lore

Re: git-gui hangs on read

Benjamin Collins <ben.collins@acm.org> wrote:
> I just upgraded a few machines (RHEL 4.4) to the latest stable, and
> git-gui stopped working.  It just hangs forever if it's in a git
> repository.
...
Show 13 quoted lines
> [pid 16903] write(1, "@(#) International Ispell Versio"..., 68 <unfinished ...>
> [pid 16897] <... read resumed> "@(#) International Ispell Versio"..., 4096) = 68
> [pid 16903] <... write resumed> )       = 68
> [pid 16903] fstat(0, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
> [pid 16903] mmap(NULL, 4096, PROT_READ|PROT_WRITE,
> MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2a983cf000
> [pid 16903] read(0,  <unfinished ...>
> [pid 16897] write(5, "!\n$$cr master\n", 14) = 14
> [pid 16903] <... read resumed> "!\n$$cr master\n", 4096) = 14
> [pid 16897] read(6,  <unfinished ...>
> [pid 16903] read(0,
> 
> Has anyone seen this before?

Nope. This was a new feature of git-gui 0.10; we now launch an aspell session in the background via a bi-directional pipe and use it to spell check the commit message area on the fly. The reason Git 1.5.4 doesn't have this problem is because it ships with git-gui 0.9.x, which doesn't have this spell check.

I'm not sure why your system is hanging. I've used git-gui 0.10 on Mac OS 10.4, 10.5 and Windows without any issues for many weeks prior to the 1.5.5 release. Doesn't mean there isn't possibly something wrong here, I just had thought this was pretty stable code at this point.

>From the strace it looks like your aspell is not giving us a
reply to the "$$cr master" command.  What does this give you?
	aspell --mode=none --encoding=UTF-8 pipe <<EOF
	!
	$$cr master
	EOF
-- 
Shawn.
Benjamin Collins· Apr 22, 2008, 13:34 UTC · re: Shawn O. Pearce · lore

Re: git-gui hangs on read

On Mon, Apr 21, 2008 at 7:13 PM, Shawn O. Pearce <spearce@spearce.org> wrote:
Show 10 quoted lines
>  From the strace it looks like your aspell is not giving us a
>  reply to the "$$cr master" command.  What does this give you?
>
>         aspell --mode=none --encoding=UTF-8 pipe <<EOF
>         !
>         $$cr master
>         EOF
>
>  --
>  Shawn.
Response:
$ aspell --mode=none --encoding=UTF-8 pipe <<EOF
> !
> $$cr master
> EOF

@(#) International Ispell Version 3.1.20 (but really Aspell 0.50.5) & cr 70 5: Cr, cry, RC, CPR, CRT, Car, car, ctr, cur, CT, Ct, ct, C, R, c, r, Ce , cir, Gr, Jr, Kr, gr, qr, NCR, OCR, VCR, CA, CO, Ca, Co, Cu, RR, ca, cc, ck, co , cu, cw, yr, BR, Br, CB, CD, CF, CV, CZ, Cb, Cd, Cf, Cl, Cm, Cs, Dr, Fr, HR, Lr , Mr, PR, Pr, Sr, Zr, cf, cg, cl, cm, cs, fr, hr, pr, tr

$
-- 
Benjamin A. Collins <ben.collins@acm.org>
Shawn O. Pearce· Apr 22, 2008, 23:25 UTC · re: Benjamin Collins · lore

Re: git-gui hangs on read

Benjamin Collins <ben.collins@acm.org> wrote:
Show 14 quoted lines
> On Mon, Apr 21, 2008 at 7:13 PM, Shawn O. Pearce <spearce@spearce.org> wrote:
> >  From the strace it looks like your aspell is not giving us a
> >  reply to the "$$cr master" command.  What does this give you?
> 
> $ aspell --mode=none --encoding=UTF-8 pipe <<EOF
> > !
> > $$cr master
> > EOF
> @(#) International Ispell Version 3.1.20 (but really Aspell 0.50.5)
> & cr 70 5: Cr, cry, RC, CPR, CRT, Car, car, ctr, cur, CT, Ct, ct, C, R, c, r, Ce
> , cir, Gr, Jr, Kr, gr, qr, NCR, OCR, VCR, CA, CO, Ca, Co, Cu, RR, ca, cc, ck, co
> , cu, cw, yr, BR, Br, CB, CD, CF, CV, CZ, Cb, Cd, Cf, Cl, Cm, Cs, Dr, Fr, HR, Lr
> , Mr, PR, Pr, Sr, Zr, cf, cg, cl, cm, cs, fr, hr, pr, tr
> 

Awww hell. I think I see two issues. The first is $$ maybe was expanded by your shell so aspell didn't see it as a command? I should have used <<'EOF' to avoid that, but I uh, forgot.

Can you upgrade aspell to 0.60.5? Everywhere that I have used git-gui 0.10 that's the version I have had available. I wonder if 0.50.5 has an issue here, or just doesn't support the "$$cr" command I was trying to use. In which case I can try to make git-gui 0.10.2 detect the aspell version and avoid using $$cr if its an old version.

-- 
Shawn.
Gustaf Hendeby· Apr 23, 2008, 08:50 UTC · re: Shawn O. Pearce · lore

Re: git-gui hangs on read

On 04/23/2008 01:25 AM, Shawn O. Pearce wrote:
Show 26 quoted lines
> Benjamin Collins <ben.collins@acm.org> wrote:
>> On Mon, Apr 21, 2008 at 7:13 PM, Shawn O. Pearce <spearce@spearce.org> wrote:
>>>  From the strace it looks like your aspell is not giving us a
>>>  reply to the "$$cr master" command.  What does this give you?
>> $ aspell --mode=none --encoding=UTF-8 pipe <<EOF
>>> !
>>> $$cr master
>>> EOF
>> @(#) International Ispell Version 3.1.20 (but really Aspell 0.50.5)
>> & cr 70 5: Cr, cry, RC, CPR, CRT, Car, car, ctr, cur, CT, Ct, ct, C, R, c, r, Ce
>> , cir, Gr, Jr, Kr, gr, qr, NCR, OCR, VCR, CA, CO, Ca, Co, Cu, RR, ca, cc, ck, co
>> , cu, cw, yr, BR, Br, CB, CD, CF, CV, CZ, Cb, Cd, Cf, Cl, Cm, Cs, Dr, Fr, HR, Lr
>> , Mr, PR, Pr, Sr, Zr, cf, cg, cl, cm, cs, fr, hr, pr, tr
>>
> 
> Awww hell.  I think I see two issues.  The first is $$ maybe
> was expanded by your shell so aspell didn't see it as a command?
> I should have used <<'EOF' to avoid that, but I uh, forgot.
> 
> Can you upgrade aspell to 0.60.5?  Everywhere that I have used
> git-gui 0.10 that's the version I have had available.  I wonder
> if 0.50.5 has an issue here, or just doesn't support the "$$cr"
> command I was trying to use.  In which case I can try to make
> git-gui 0.10.2 detect the aspell version and avoid using $$cr
> if its an old version.
> 
Hi!

I just ran into the same/similar problem using the latest msysGit git version on Windows XP.

I have aspell 0.50.3 alpha installed on my laptop, and that seems to be basically up to date for the Windows port of aspell. Is there any way to get around this problem?

/Gustaf
Benjamin Collins· Apr 23, 2008, 14:16 UTC · re: Gustaf Hendeby · lore

Re: git-gui hangs on read

On Wed, Apr 23, 2008 at 3:50 AM, Gustaf Hendeby <hendeby@isy.liu.se> wrote:
Show 6 quoted lines
>  I have aspell 0.50.3 alpha installed on my laptop, and that seems to be
> basically up to date for the Windows port of aspell.  Is there any way to
> get around this problem?
>
>  /Gustaf
>

What I have done for now is to comment out the line in gui-gui that does the lappend on spell_cmd, near the end.

Sorry for the dupe.
-- 
Benjamin A. Collins <ben.collins@acm.org>
Shawn O. Pearce· Apr 24, 2008, 01:00 UTC · re: Gustaf Hendeby · lore

Re: git-gui hangs on read

Gustaf Hendeby <hendeby@isy.liu.se> wrote:
> On 04/23/2008 04:16 PM, Benjamin Collins wrote:
> >What I have done for now is to comment out the line in gui-gui that
> >does the lappend on spell_cmd, near the end.

Here's another work around that doesn't require editing the code. Just turn the d**n spell checker off:

	git config --global gui.spellingdictionary none

That will keep us from evening trying to launch aspell, and since its global (in your ~/.gitconfig) it should default into every repository you have, or create.

Apparently aspell 0.50 does not like git-gui. I'll have to look at the version header and abort trying to use aspell if it is pre 0.60.

git-gui 0.10.2 here we come.
-- 
Shawn.
Gustaf Hendeby· Apr 24, 2008, 06:54 UTC · re: Shawn O. Pearce · lore

Re: git-gui hangs on read

On 04/24/2008 03:00 AM, Shawn O. Pearce wrote:
Show 7 quoted lines
> Just turn the d**n spell checker off:
> 
> 	git config --global gui.spellingdictionary none
> 
> That will keep us from evening trying to launch aspell, and since
> its global (in your ~/.gitconfig) it should default into every
> repository you have, or create.

Thanks, even better! Though, I can't seem to find this option (and other ones indicated by the source) documented anywhere. Where would be the place to put such information? For git options the place seems to be the git config help, but given that the git gui is maintained independently the choice is less obvious to me.

/Gustaf
Shawn O. Pearce· Apr 25, 2008, 01:02 UTC · re: Gustaf Hendeby · lore

Re: git-gui hangs on read

Gustaf Hendeby <hendeby@isy.liu.se> wrote:
Show 14 quoted lines
> On 04/24/2008 03:00 AM, Shawn O. Pearce wrote:
> >Just turn the d**n spell checker off:
> >
> >	git config --global gui.spellingdictionary none
> >
> >That will keep us from evening trying to launch aspell, and since
> >its global (in your ~/.gitconfig) it should default into every
> >repository you have, or create.
> 
> Thanks, even better!  Though, I can't seem to find this option (and 
> other ones indicated by the source) documented anywhere.  Where would be 
> the place to put such information?  For git options the place seems to 
> be the git config help, but given that the git gui is maintained 
> independently the choice is less obvious to me.

Indeed. The git-gui options dialog lets you select this value, but you can't get into git-gui far enough to open that dialog.

As far as documenting the git-gui options, maybe they should go into either Documentation/git-gui.txt or into Documentation/config.txt in the main git.git project. The latter almost makes sense because git-gui does store its preferences in the same config file, and that file describes the valid keys and what they mean.

-- 
Shawn.
Gustaf Hendeby· Apr 25, 2008, 06:45 UTC · re: Shawn O. Pearce · lore

Re: git-gui hangs on read

On 04/25/2008 03:02 AM, Shawn O. Pearce wrote:
Show 21 quoted lines
> Gustaf Hendeby <hendeby@isy.liu.se> wrote:
>> On 04/24/2008 03:00 AM, Shawn O. Pearce wrote:
>>> Just turn the d**n spell checker off:
>>>
>>> 	git config --global gui.spellingdictionary none
>>>
>>> That will keep us from evening trying to launch aspell, and since
>>> its global (in your ~/.gitconfig) it should default into every
>>> repository you have, or create.
>> Thanks, even better!  Though, I can't seem to find this option (and 
>> other ones indicated by the source) documented anywhere.  Where would be 
>> the place to put such information?  For git options the place seems to 
>> be the git config help, but given that the git gui is maintained 
>> independently the choice is less obvious to me.
> 
> As far as documenting the git-gui options, maybe they should go into
> either Documentation/git-gui.txt or into Documentation/config.txt
> in the main git.git project.  The latter almost makes sense because
> git-gui does store its preferences in the same config file, and that
> file describes the valid keys and what they mean.
> 

My first thought about the documentation was to put it in Documentation/config.txt but wouldn't that be strange if someone uses a git-gui other than the one bundled with the git version used? On the other hand, if the keys don't ever change that is not a big problem.

I'll try to have a go at writing some docs, but it won't be until late next week because my daytime work is killing me right now.

/Gustaf

← back to recent threads