From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#10674: 24.0.92; cmdproxy.exe fork-bomb Date: Mon, 06 Feb 2012 19:50:05 +0200 Message-ID: <83ty33c0mq.fsf@gnu.org> References: <86mx94a7kq.fsf@DESKTOP.i-did-not-set--mail-host-address--so-tickle-me> <83fwetp2ls.fsf@gnu.org> <4F2B5793.2010809@spamcop.net> <83y5skdwht.fsf@gnu.org> <4F2FF1E1.30008@spamcop.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: dough.gmane.org 1328550688 18996 80.91.229.3 (6 Feb 2012 17:51:28 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 6 Feb 2012 17:51:28 +0000 (UTC) Cc: 10674@debbugs.gnu.org To: Simon Morgan Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 06 18:51:27 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RuSis-000085-A0 for geb-bug-gnu-emacs@m.gmane.org; Mon, 06 Feb 2012 18:51:26 +0100 Original-Received: from localhost ([::1]:55595 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RuSir-00084e-Nt for geb-bug-gnu-emacs@m.gmane.org; Mon, 06 Feb 2012 12:51:25 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:52821) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RuSij-00083B-QU for bug-gnu-emacs@gnu.org; Mon, 06 Feb 2012 12:51:23 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RuSid-0000mC-Uc for bug-gnu-emacs@gnu.org; Mon, 06 Feb 2012 12:51:17 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53828) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RuSid-0000m7-Qz for bug-gnu-emacs@gnu.org; Mon, 06 Feb 2012 12:51:11 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1RuSjS-0003xR-Fx for bug-gnu-emacs@gnu.org; Mon, 06 Feb 2012 12:52:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 Feb 2012 17:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10674 X-GNU-PR-Package: emacs,w32 X-GNU-PR-Keywords: Original-Received: via spool by 10674-submit@debbugs.gnu.org id=B10674.132855066415146 (code B ref 10674); Mon, 06 Feb 2012 17:52:02 +0000 Original-Received: (at 10674) by debbugs.gnu.org; 6 Feb 2012 17:51:04 +0000 Original-Received: from localhost ([127.0.0.1]:57451 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RuSiV-0003wE-FR for submit@debbugs.gnu.org; Mon, 06 Feb 2012 12:51:03 -0500 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:63244) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RuSiS-0003vh-Av for 10674@debbugs.gnu.org; Mon, 06 Feb 2012 12:51:01 -0500 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0LYZ00A00FY7JW00@a-mtaout20.012.net.il> for 10674@debbugs.gnu.org; Mon, 06 Feb 2012 19:50:02 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([84.229.162.243]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LYZ009KTG7DKRG0@a-mtaout20.012.net.il>; Mon, 06 Feb 2012 19:50:02 +0200 (IST) In-reply-to: <4F2FF1E1.30008@spamcop.net> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:56578 Archived-At: > Date: Mon, 06 Feb 2012 15:29:37 +0000 > From: Simon Morgan > CC: 10674@debbugs.gnu.org >=20 > > If indeed cmdproxy spawns itself endlessly, then the first suspec= t is > > this code in cmdproxy.c: > > > > if (!SearchPath (NULL, argv[0], ".exe", sizeof (path), path,&p= rogname) > > || !GetShortPathName (path, path, sizeof (path)) > > || stricmp (modname, path) !=3D 0) > > { > > /* We are being used as a helper to run a DOS app; just pa= ss > > =09 command line to DOS app without change. */ > > /* TODO: fill in progname. */ > > if (spawn (NULL, GetCommandLine (), dir,&rc)) > > =09return rc; > > fail ("Could not run %s\n", GetCommandLine ()); > > } > > > > Are you able to run cmdproxy under a debugger and see what is goi= ng on > > here? If so, please tell what are argv[0], path, and modname jus= t > > before the call to `spawn' (assuming my guess is correct, and cmd= proxy > > really calls `spawn' in this snippet). >=20 > Okay so I managed to get cmdproxy running under gdb without much tr= ouble=20 > so here is what you asked for: >=20 > http://pastie.org/3327496 Thanks. For the record, I reproduce that here: C:\emacs-24.0.92\bin>gdb cmdproxy.exe GNU gdb (GDB) 7.3.1 Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show c= opying" and "show warranty" for details. This GDB was configured as "mingw32". For bug reporting instructions, please see: ... Reading symbols from c:\emacs-24.0.92\bin\cmdproxy.exe...done. (gdb) break 565 Breakpoint 1 at 0x401f3f: file cmdproxy.c, line 565. (gdb) r Starting program: c:\emacs-24.0.92\bin\cmdproxy.exe [New Thread 4636.0x11e0] Breakpoint 1, main (argc=3D1, argv=3D0x5e2c18) at cmdproxy.c:565 565 if (spawn (NULL, GetCommandLine (), dir, &rc)) (gdb) p argv[0] $1 =3D 0x5e2b51 "c:\\emacs-24.0.92\\bin\\cmdproxy.exe" (gdb) p path $2 =3D "c:\\emacs-24.0.92\\bin\\cmdproxy.exe\000\000\000\000\000\00= 0\000c\001\000\001\000\000\000\000\177\000\000\000=C3=95V\000\000\060= =C3=BC(\000@Wpwh=C3=BD(\000\064=C3=BD(\000v\arw\000\000\210\000\000\0= 00\000\000\000\000\210\000=C3=B0=E2=80=A1\210\000=C3=8A=C2=B8gw=C3= =B0=E2=80=A1\210\000\000\000\210\000\000\000\210\000=C3=8A=C2=B8gw= =C3=B0=E2=80=A1\210\000x=C3=BD(\000 \027rw8\001\210\000\004\027rw= =C3=BF\003ew\000\000\210\000\000\000\210\000\000\000\000\000\000\000\= 210\000\000\000^\000\000\000\001\001D=C3=BD(\000\000\000^\000\\=C3= =BE(\000=C3=95qlw\027.*\000=C3=BE=C3=BF=C3=BF=C3=BF\004\027rw=C5=A1= =C2=ABmw\000\000\210\000c\000\000P"... (gdb) p modname $3 =3D "c:\\emacs-24.0.92\\bin\\cmdproxy.exe\000^\000\000\000^\000= =C2=A8\016^\000=C2=A8\016^\000\001\000\000\000\000\000^\000@=C3=BE(\0= 00=C3=AD\033rw8\001^\000=C3=91\033rw=C3=87\000ew\000\000\000\000\000\= 000^\000=C2=A8\016^\000=C3=BE=C3=BF=C3=BF=C3=BF\200\000\000\000=C3= =BA=E2=80=BAm\001\f=C3=BE(\000a\000\000P\230=C3=BE(\000=C3=95qlw=C2= =B7/*\000=C3=BE=C3=BF=C3=BF=C3=BF=C3=91\033rw=C3=BA=E2=80=BAmw\000\00= 0^\000a\000\000P=C2=A8\016^\000=C2=A8\016^\000=C2=A8=C3=BE(\000\200= =C3=B4=C3=8Av\000\000^\000\000\000\000\000=E2=80=B0=C3=B4=C3=8Av=E2= =80=93=C2=A8=E2=80=A2\003\004\000\000\000=C2=AC\016^\000=C2=A8\016^\0= 00=C3=8A=C3=BAfw\"\020iw=C3=BF=C3=BF=C3=BF=C3=BF$\000\000\000"... (gdb) It sounds like SearchPath fails. Does it help to add c:\emacs-24.0.92\bin to your Path? > I've also discovered that cmdproxy only seems to do the whole infin= ite=20 > respawn thing if I run it in the emacs bin directory. But then how come it happens for you in customize-browse? Did you invoke Emacs in the emacs bin directory? If so, what happens if you invoke it from a different directory?