GNU bug report logs - #19181
24.4; 24.4.1 libgcc_s_dw2-1.dll crash on exit

Previous Next

Package: emacs;

Reported by: Bill Farmer <williamjfarmer <at> yahoo.co.uk>

Date: Tue, 25 Nov 2014 16:39:02 UTC

Severity: normal

Found in version 24.4

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 19181 in the body.
You can then email your comments to 19181 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#19181; Package emacs. (Tue, 25 Nov 2014 16:39:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Bill Farmer <williamjfarmer <at> yahoo.co.uk>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 25 Nov 2014 16:39:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Bill Farmer <williamjfarmer <at> yahoo.co.uk>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.4; 24.4.1 libgcc_s_dw2-1.dll crash on exit
Date: Tue, 25 Nov 2014 11:08:04 +0000
[Message part 1 (text/plain, inline)]
Hi

In the file ~/etc/PROBLEMS is a mention of potential problems with
libgcc_s_dw2-1.dll. I have an installation of MinGW on this windows
machine which is in my PATH, as do many other emacs users, I would
imagine. If I rename libgcc_s_dw2-1.dll in my MinGW installation, emacs
works fine and does not crash on exit. However, this breaks MinGW. So I
checked for mentions of libgcc in the emacs executables:

Bill <at> CYNTHIA /d/Images/emacs/emacs-24.4
$ find . -name "*.dll" -exec strings -f {} \; | grep libgcc
./bin/libXpm.dll: libgcc_s_dw2-1.dll

Bill <at> CYNTHIA /d/Images/emacs/emacs-24.4
$ find . -name "*.exe" -exec strings -f {} \; | grep libgcc
./bin/addpm.exe: libgcc_s_dw2-1.dll
./bin/ctags.exe: libgcc_s_dw2-1.dll
./bin/ebrowse.exe: libgcc_s_dw2-1.dll
./bin/emacs-24.4.exe: libgcc_s_dw2-1.dll
./bin/emacs.exe: libgcc_s_dw2-1.dll
./bin/emacsclient.exe: libgcc_s_dw2-1.dll
./bin/emacsclientw.exe: libgcc_s_dw2-1.dll
./bin/etags.exe: libgcc_s_dw2-1.dll
./bin/runemacs.exe: libgcc_s_dw2-1.dll
./libexec/emacs/24.4/i686-pc-mingw32/cmdproxy.exe: libgcc_s_dw2-1.dll
./libexec/emacs/24.4/i686-pc-mingw32/ddeclient.exe: libgcc_s_dw2-1.dll
./libexec/emacs/24.4/i686-pc-mingw32/hexl.exe: libgcc_s_dw2-1.dll
./libexec/emacs/24.4/i686-pc-mingw32/movemail.exe: libgcc_s_dw2-1.dll
./libexec/emacs/24.4/i686-pc-mingw32/profile.exe: libgcc_s_dw2-1.dll
./libexec/emacs/24.4/i686-pc-mingw32/update-game-score.exe: 
libgcc_s_dw2-1.dll

Every executable file in the emacs version 24.4 windows installation has
a reference to this dll. I don't think this problem is fixable without
building my own version from source. I use the binary version to avoid
this. I will have to revert to the previous version intil someone does a
build without this problem.

Regards
Bill

In GNU Emacs 24.4.1 (i686-pc-mingw32)
 of 2014-10-24 on LEG570
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=/c/usr'

Important settings:
  value of $LANG: ENG
  locale-coding-system: cp1252

Major mode: Fundamental

Minor modes in effect:
  delete-selection-mode: t
  show-paren-mode: t
  cua-mode: t
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <menu-bar> <help-menu> <about-emacs>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> M-x
r e p <tab> o <tab> r <tab> <return>

Recent messages:
Loading cua-base...done
Loading paren...done
For information about GNU Emacs and the GNU system, type C-h C-a.
Making completion list... [2 times]

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
help-fns mail-prsvr mail-utils help-mode easymenu saveplace delsel paren
cua-base cus-start cus-load time-date tooltip electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp
w32-common-fns disp-table w32-win w32-vars tool-bar dnd fontset image
regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register
page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core frame cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew
greek romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process w32notify w32
multi-tty emacs)

Memory information:
((conses 8 85268 6784)
 (symbols 32 18620 0)
 (miscs 32 81 107)
 (strings 16 12741 3702)
 (string-bytes 1 316673)
 (vectors 8 9842)
 (vector-slots 4 389888 5490)
 (floats 8 64 490)
 (intervals 28 256 41)
 (buffers 508 14))

[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19181; Package emacs. (Tue, 25 Nov 2014 17:27:02 GMT) Full text and rfc822 format available.

Message #8 received at 19181 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Bill Farmer <williamjfarmer <at> yahoo.co.uk>, Dani Moncayo <dmoncayo <at> gmail.com>
Cc: 19181 <at> debbugs.gnu.org
Subject: Re: bug#19181: 24.4; 24.4.1 libgcc_s_dw2-1.dll crash on exit
Date: Tue, 25 Nov 2014 19:26:51 +0200
> Date: Tue, 25 Nov 2014 11:08:04 +0000
> From: Bill Farmer <williamjfarmer <at> yahoo.co.uk>
> 
> In the file ~/etc/PROBLEMS is a mention of potential problems with
> libgcc_s_dw2-1.dll.

Do you have a problem that resembles what etc/PROBLEMS describes?  If
so, please describe your problem in detail here.  In particular,
please tell which optional DLLs do you have installed that depend on
libgcc_s_dw2-1.dll (how to check that is described below).

> I have an installation of MinGW on this windows
> machine which is in my PATH, as do many other emacs users, I would
> imagine. If I rename libgcc_s_dw2-1.dll in my MinGW installation, emacs
> works fine and does not crash on exit.  However, this breaks MinGW.

You are not supposed to rename that DLL to solve the problem.  Did you
try the solution suggested by etc/PROBLEMS?

> So I checked for mentions of libgcc in the emacs executables:
> 
> Bill <at> CYNTHIA /d/Images/emacs/emacs-24.4
> $ find . -name "*.dll" -exec strings -f {} \; | grep libgcc
> ./bin/libXpm.dll: libgcc_s_dw2-1.dll
> 
> Bill <at> CYNTHIA /d/Images/emacs/emacs-24.4
> $ find . -name "*.exe" -exec strings -f {} \; | grep libgcc
> ./bin/addpm.exe: libgcc_s_dw2-1.dll
> ./bin/ctags.exe: libgcc_s_dw2-1.dll
> ./bin/ebrowse.exe: libgcc_s_dw2-1.dll
> ./bin/emacs-24.4.exe: libgcc_s_dw2-1.dll
> ./bin/emacs.exe: libgcc_s_dw2-1.dll
> ./bin/emacsclient.exe: libgcc_s_dw2-1.dll
> ./bin/emacsclientw.exe: libgcc_s_dw2-1.dll
> ./bin/etags.exe: libgcc_s_dw2-1.dll
> ./bin/runemacs.exe: libgcc_s_dw2-1.dll
> ./libexec/emacs/24.4/i686-pc-mingw32/cmdproxy.exe: libgcc_s_dw2-1.dll
> ./libexec/emacs/24.4/i686-pc-mingw32/ddeclient.exe: libgcc_s_dw2-1.dll
> ./libexec/emacs/24.4/i686-pc-mingw32/hexl.exe: libgcc_s_dw2-1.dll
> ./libexec/emacs/24.4/i686-pc-mingw32/movemail.exe: libgcc_s_dw2-1.dll
> ./libexec/emacs/24.4/i686-pc-mingw32/profile.exe: libgcc_s_dw2-1.dll
> ./libexec/emacs/24.4/i686-pc-mingw32/update-game-score.exe: libgcc_s_dw2-1.dll
> 
> Every executable file in the emacs version 24.4 windows installation has
> a reference to this dll.

The fact that 'strings' finds the name of the DLL in the executable
doesn't mean the executable depends on that DLL.  It most probably
means that the debug info refers to it.

To check whether a .exe program or a DLL actually depends on
libgcc_s_dw2-1.dll, use this command:

  objdump -x FOO.exe | grep "DLL Name:"

This will show all the DLLs that FOO.exe depends on.

Alternatively, use the Dependency Walker (http://www.dependencywalker.com/).

> I don't think this problem is fixable without
> building my own version from source. I use the binary version to avoid
> this.

Please describe the problem in detail, I don't think we have enough
information yet to understand what is going on.

Meanwhile, Dani, could you please check which of the binaries in your
upload, if any, depends on libgcc_s_dw2-1.dll?

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19181; Package emacs. (Tue, 25 Nov 2014 18:59:01 GMT) Full text and rfc822 format available.

Message #11 received at 19181 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Bill Farmer <williamjfarmer <at> yahoo.co.uk>
Cc: 19181 <at> debbugs.gnu.org
Subject: Re: bug#19181: 24.4; 24.4.1 libgcc_s_dw2-1.dll crash on exit
Date: Tue, 25 Nov 2014 20:58:51 +0200
[Please keep the bug address on the CC list.]

> Date: Tue, 25 Nov 2014 18:23:22 +0000
> From: Bill Farmer <williamjfarmer <at> yahoo.co.uk>
> 
> The problem I have with emacs is that it crashes on exit if a file has been
> visited. If emacs is quit immediately with no other actions other than quit, it
> does not crash. This is a virgin installation of emacs with no additional dlls,
> I had not even got around to moving my additional files in site-lisp. The only
> dll in the installation is libXpm.dll. This problem is similar to that
> mentioned in etc/PROBLEMS. I can't fix the problem as described here because I
> have not added any additional dlls.

Could it be that you have some of the additional DLLs somewhere on
PATH?

Can you see which DLLs Emacs loads after you visit a file?  One way of
doing that is to use the Process Explorer program from SysInternals.

> The windows error report says:
> 
> Faulting application name: emacs.exe, version: 24.4.0.0, time stamp: 0x544a8d9a
> Faulting module name: libgcc_s_dw2-1.dll, version: 0.0.0.0, time stamp:
> 0x525049a5
> Exception code: 0x40000015
> Fault offset: 0x000148fe
> Faulting process id: 0xeac
> Faulting application start time: 0x01d008d7f7fa4d51
> Faulting application path: D:\Images\emacs\emacs-24.4\bin\emacs.exe
> Faulting module path: C:\MinGW\bin\libgcc_s_dw2-1.dll

Which version of MinGW GCC do you have installed?

> 
> This is very similar to the problem reported here:
> http://emacs.1067599.n5.nabble.com/Emacs-crashes-when-I-try-to-quit-td76908.html.
> 
> I have checked using objdump, none of the executable files in emacs have a
> dependency on libgcc_s_dw2-1.dll. This is as expected, as emacs works fine if I
> rename this file in MinGW. I also tried renaming libXpm.dll in the emacs
> installation. This made no difference, it still crashes on exit.

My suspicion is that Emacs loads some other DLL which depends on
libgcc_s_dw2-1.dll.  Looking at the DLLs loaded into the Emacs process
after you visit a file might shed some light on this.

> The problem would appear to be that emacs loads libgcc_s_dw2-1.dll, if a file
> is visited, and if libgcc_s_dw2-1.dll can be found, and this causes a crash on
> exit as per etc/PROBLEMS.

But since you say that Emacs works OK without libgcc_s_dw2-1.dll, what
happens is probably a bit more complicated.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19181; Package emacs. (Tue, 25 Nov 2014 19:04:01 GMT) Full text and rfc822 format available.

Message #14 received at 19181 <at> debbugs.gnu.org (full text, mbox):

From: Dani Moncayo <dmoncayo <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 19181 <at> debbugs.gnu.org, Bill Farmer <williamjfarmer <at> yahoo.co.uk>
Subject: Re: bug#19181: 24.4; 24.4.1 libgcc_s_dw2-1.dll crash on exit
Date: Tue, 25 Nov 2014 20:03:00 +0100
[Message part 1 (text/plain, inline)]
> To check whether a .exe program or a DLL actually depends on
> libgcc_s_dw2-1.dll, use this command:
>
>   objdump -x FOO.exe | grep "DLL Name:"
>
> This will show all the DLLs that FOO.exe depends on.

> Meanwhile, Dani, could you please check which of the binaries in your
> upload, if any, depends on libgcc_s_dw2-1.dll?

I've followed your advice above, and I don't see any dependency on
'libgcc_s_dw2-1.dll'.

FWIW, I'm attaching a report of the DLL dependencies in the Emacs 24.4
binary, made with:

  $ find . -type f \( -name "*.dll" -o -name "*.exe" \) -print -exec
bash -c "objdump -x {} | grep -i 'dll name:'" \;


-- 
Dani Moncayo
[report.txt (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19181; Package emacs. (Tue, 25 Nov 2014 19:08:01 GMT) Full text and rfc822 format available.

Message #17 received at 19181 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dani Moncayo <dmoncayo <at> gmail.com>
Cc: 19181 <at> debbugs.gnu.org, williamjfarmer <at> yahoo.co.uk
Subject: Re: bug#19181: 24.4; 24.4.1 libgcc_s_dw2-1.dll crash on exit
Date: Tue, 25 Nov 2014 21:08:06 +0200
> Date: Tue, 25 Nov 2014 20:03:00 +0100
> From: Dani Moncayo <dmoncayo <at> gmail.com>
> Cc: Bill Farmer <williamjfarmer <at> yahoo.co.uk>, 19181 <at> debbugs.gnu.org
> 
> I've followed your advice above, and I don't see any dependency on
> 'libgcc_s_dw2-1.dll'.
> 
> FWIW, I'm attaching a report of the DLL dependencies in the Emacs 24.4
> binary, made with:
> 
>   $ find . -type f \( -name "*.dll" -o -name "*.exe" \) -print -exec
> bash -c "objdump -x {} | grep -i 'dll name:'" \;

No dependencies, as expected.  Thanks.

Btw, which version of GCC did you use to build this binary?

Bill, this indicates that the root cause for the problem, or at least
the way to investigate it, is on your machine.  As I wrote earlier, I
suspect that Emacs loads some DLL at runtime which depends on
libgcc_s_dw2-1.dll.  Please try to identify that DLL.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19181; Package emacs. (Tue, 25 Nov 2014 19:12:03 GMT) Full text and rfc822 format available.

Message #20 received at 19181 <at> debbugs.gnu.org (full text, mbox):

From: Dani Moncayo <dmoncayo <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 19181 <at> debbugs.gnu.org, Bill Farmer <williamjfarmer <at> yahoo.co.uk>
Subject: Re: bug#19181: 24.4; 24.4.1 libgcc_s_dw2-1.dll crash on exit
Date: Tue, 25 Nov 2014 20:11:21 +0100
> Btw, which version of GCC did you use to build this binary?

GCC 4.7.2

And FWIW:

$ gcc -v
Using built-in specs.
COLLECT_GCC=c:\mingw\bin\gcc.exe
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.7.2/lto-wrapper.exe
Target: mingw32
Configured with: ../gcc-4.7.2/configure
--enable-languages=c,c++,ada,fortran,objc,obj-c++
--disable-sjlj-exceptions --with-dwarf2 --enable-shared
--enable-libgomp --disable-win32-registry --enable-libstdcxx-debug
--disable-build-poststage1-with-cxx
--enable-version-specific-runtime-libs --build=mingw32 --prefix=/mingw
Thread model: win32
gcc version 4.7.2 (GCC)


-- 
Dani Moncayo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19181; Package emacs. (Tue, 25 Nov 2014 21:02:02 GMT) Full text and rfc822 format available.

Message #23 received at 19181 <at> debbugs.gnu.org (full text, mbox):

From: Óscar Fuentes <ofv <at> wanadoo.es>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 19181 <at> debbugs.gnu.org, williamjfarmer <at> yahoo.co.uk,
 Dani Moncayo <dmoncayo <at> gmail.com>
Subject: Re: bug#19181: 24.4; 24.4.1 libgcc_s_dw2-1.dll crash on exit
Date: Tue, 25 Nov 2014 22:01:08 +0100
FYI: MinGW-w64 recently made changes to its runtime to address this
problem. In my experience (not with Emacs, with Tcl/Tk) there are no
more crashes on application exit.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19181; Package emacs. (Tue, 25 Nov 2014 23:43:02 GMT) Full text and rfc822 format available.

Message #26 received at 19181 <at> debbugs.gnu.org (full text, mbox):

From: Bill Farmer <williamjfarmer <at> yahoo.co.uk>
To: Dani Moncayo <dmoncayo <at> gmail.com>, Eli Zaretskii <eliz <at> gnu.org>
Cc: 19181 <at> debbugs.gnu.org
Subject: Re: bug#19181: 24.4; 24.4.1 libgcc_s_dw2-1.dll crash on exit
Date: Tue, 25 Nov 2014 23:42:39 +0000
[Message part 1 (text/plain, inline)]
I have done a plain vanilla build of emacs 24.4 with my version of MinGW:

$ gcc -v
Using built-in specs.
COLLECT_GCC=c:\MinGW\bin\gcc.exe
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.8.1/lto-wrapper.exe
Target: mingw32
Configured with: ../gcc-4.8.1/configure --prefix=/mingw --host=mingw32 
--build=m
ingw32 --without-pic --enable-shared --enable-static --with-gnu-ld 
--enable-lto
--enable-libssp --disable-multilib 
--enable-languages=c,c++,fortran,objc,obj-c++
,ada --disable-sjlj-exceptions --with-dwarf2 --disable-win32-registry 
--enable-l
ibstdcxx-debug --enable-version-specific-runtime-libs 
--with-gmp=/usr/src/pkg/gm
p-5.1.2-1-mingw32-src/bld 
--with-mpc=/usr/src/pkg/mpc-1.0.1-1-mingw32-src/bld --
with-mpfr= --with-system-zlib --with-gnu-as --enable-decimal-float=yes 
--enable-
libgomp --enable-threads --with-libiconv-prefix=/mingw32 
--with-libintl-prefix=/
mingw --disable-bootstrap LDFLAGS=-s CFLAGS=-D_USE_32BIT_TIME_T
Thread model: win32
gcc version 4.8.1 (GCC)

Configured using:
 `configure --prefix=/d/c/emacs/build/usr'

I cannot reproduce the crash on exit problem with this version. It does 
not include the libXpm.dll file.

Regards
Bill Farmer

On 25/11/2014 19:11, Dani Moncayo wrote:
>> Btw, which version of GCC did you use to build this binary?
> GCC 4.7.2
>
> And FWIW:
>
> $ gcc -v
> Using built-in specs.
> COLLECT_GCC=c:\mingw\bin\gcc.exe
> COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.7.2/lto-wrapper.exe
> Target: mingw32
> Configured with: ../gcc-4.7.2/configure
> --enable-languages=c,c++,ada,fortran,objc,obj-c++
> --disable-sjlj-exceptions --with-dwarf2 --enable-shared
> --enable-libgomp --disable-win32-registry --enable-libstdcxx-debug
> --disable-build-poststage1-with-cxx
> --enable-version-specific-runtime-libs --build=mingw32 --prefix=/mingw
> Thread model: win32
> gcc version 4.7.2 (GCC)
>
>

[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19181; Package emacs. (Wed, 26 Nov 2014 03:43:01 GMT) Full text and rfc822 format available.

Message #29 received at 19181 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Óscar Fuentes <ofv <at> wanadoo.es>
Cc: 19181 <at> debbugs.gnu.org, williamjfarmer <at> yahoo.co.uk, dmoncayo <at> gmail.com
Subject: Re: bug#19181: 24.4; 24.4.1 libgcc_s_dw2-1.dll crash on exit
Date: Wed, 26 Nov 2014 05:42:45 +0200
> From: Óscar Fuentes <ofv <at> wanadoo.es>
> Cc: Dani Moncayo <dmoncayo <at> gmail.com>,  19181 <at> debbugs.gnu.org,  williamjfarmer <at> yahoo.co.uk
> Date: Tue, 25 Nov 2014 22:01:08 +0100
> 
> FYI: MinGW-w64 recently made changes to its runtime to address this
> problem.

I presume it's an upstream fix that I was asked to test.

Anyway, this has nothing to do with crashes when the binary does not
depend on libgcc_s_dw2-1.dll.  Some other factor is at work here.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19181; Package emacs. (Wed, 26 Nov 2014 03:48:01 GMT) Full text and rfc822 format available.

Message #32 received at 19181 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Bill Farmer <williamjfarmer <at> yahoo.co.uk>
Cc: 19181 <at> debbugs.gnu.org, dmoncayo <at> gmail.com
Subject: Re: bug#19181: 24.4; 24.4.1 libgcc_s_dw2-1.dll crash on exit
Date: Wed, 26 Nov 2014 05:47:58 +0200
> Date: Tue, 25 Nov 2014 23:42:39 +0000
> From: Bill Farmer <williamjfarmer <at> yahoo.co.uk>
> CC: 19181 <at> debbugs.gnu.org
> 
> I have done a plain vanilla build of emacs 24.4 with my version of MinGW:
> 
> $ gcc -v
> Using built-in specs.
> COLLECT_GCC=c:\MinGW\bin\gcc.exe
> COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.8.1/lto-wrapper.exe
> Target: mingw32
> Configured with: ../gcc-4.8.1/configure --prefix=/mingw --host=mingw32 -
> -build=m
> ingw32 --without-pic --enable-shared --enable-static --with-gnu-ld --enable-lto
> --enable-libssp --disable-multilib -
> -enable-languages=c,c++,fortran,objc,obj-c++
> ,ada --disable-sjlj-exceptions --with-dwarf2 --disable-win32-registry -
> -enable-l
> ibstdcxx-debug --enable-version-specific-runtime-libs -
> -with-gmp=/usr/src/pkg/gm
> p-5.1.2-1-mingw32-src/bld --with-mpc=/usr/src/pkg/mpc-1.0.1-1-mingw32-src/bld -
> -
> with-mpfr= --with-system-zlib --with-gnu-as --enable-decimal-float=yes -
> -enable-
> libgomp --enable-threads --with-libiconv-prefix=/mingw32 -
> -with-libintl-prefix=/
> mingw --disable-bootstrap LDFLAGS=-s CFLAGS=-D_USE_32BIT_TIME_T
> Thread model: win32
> gcc version 4.8.1 (GCC)
> 
> Configured using:
> `configure --prefix=/d/c/emacs/build/usr'
> 
> I cannot reproduce the crash on exit problem with this version. It does not
> include the libXpm.dll file.

Please try to find the DLLs loaded into the Emacs binary that does
crash.  I don't see any other way of finding out what caused it.
Somewhere on your system there is a DLL that depends on
libgcc_s_dw2-1.dll, and finding it is the way to solve this riddle.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19181; Package emacs. (Wed, 26 Nov 2014 10:07:02 GMT) Full text and rfc822 format available.

Message #35 received at 19181 <at> debbugs.gnu.org (full text, mbox):

From: Bill Farmer <williamjfarmer <at> yahoo.co.uk>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 19181 <at> debbugs.gnu.org, dmoncayo <at> gmail.com
Subject: Re: bug#19181: 24.4; 24.4.1 libgcc_s_dw2-1.dll crash on exit
Date: Wed, 26 Nov 2014 10:06:27 +0000
[Message part 1 (text/plain, inline)]
I have used the Sysinternals process explorer, 
(http://technet.microsoft.com/en-us/sysinternals/bb896653), to determine 
the loaded dlls. Unfortunately it does not show a dynamic dependency 
tree. This shows that when a file is visited, the distribution version 
of emacs 24.4 loads zlib1.dll from the MinGW installation and 
libgcc_s_dw2-1.dll also from the MinGW installation. These are the only 
non-microsoft dlls I can see. The version of emacs 24.4 I built does not 
load any non-microsoft dlls. I have attached four text files showing the 
dlls loaded by the distribution version of emacs 24.4 when no files have 
been visited, the dlls loaded by the distribution version after a file 
has been visited, the dlls loaded by the locally built version of emacs 
24.4 when no files have been visited, and the dlls loaded by the locally 
built version of emacs 24.4 after a file have been visited.

Hope this helps.

Regards
Bill Farmer

On 26/11/2014 03:47, Eli Zaretskii wrote:
>> Date: Tue, 25 Nov 2014 23:42:39 +0000
>> From: Bill Farmer <williamjfarmer <at> yahoo.co.uk>
>> CC: 19181 <at> debbugs.gnu.org
>>
>> I have done a plain vanilla build of emacs 24.4 with my version of MinGW:
>>
>> $ gcc -v
>> Using built-in specs.
>> COLLECT_GCC=c:\MinGW\bin\gcc.exe
>> COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.8.1/lto-wrapper.exe
>> Target: mingw32
>> Configured with: ../gcc-4.8.1/configure --prefix=/mingw --host=mingw32 -
>> -build=m
>> ingw32 --without-pic --enable-shared --enable-static --with-gnu-ld --enable-lto
>> --enable-libssp --disable-multilib -
>> -enable-languages=c,c++,fortran,objc,obj-c++
>> ,ada --disable-sjlj-exceptions --with-dwarf2 --disable-win32-registry -
>> -enable-l
>> ibstdcxx-debug --enable-version-specific-runtime-libs -
>> -with-gmp=/usr/src/pkg/gm
>> p-5.1.2-1-mingw32-src/bld --with-mpc=/usr/src/pkg/mpc-1.0.1-1-mingw32-src/bld -
>> -
>> with-mpfr= --with-system-zlib --with-gnu-as --enable-decimal-float=yes -
>> -enable-
>> libgomp --enable-threads --with-libiconv-prefix=/mingw32 -
>> -with-libintl-prefix=/
>> mingw --disable-bootstrap LDFLAGS=-s CFLAGS=-D_USE_32BIT_TIME_T
>> Thread model: win32
>> gcc version 4.8.1 (GCC)
>>
>> Configured using:
>> `configure --prefix=/d/c/emacs/build/usr'
>>
>> I cannot reproduce the crash on exit problem with this version. It does not
>> include the libXpm.dll file.
> Please try to find the DLLs loaded into the Emacs binary that does
> crash.  I don't see any other way of finding out what caused it.
> Somewhere on your system there is a DLL that depends on
> libgcc_s_dw2-1.dll, and finding it is the way to solve this riddle.
>
> Thanks.

[Message part 2 (text/html, inline)]
[emacs.exe.nofile-distr.txt (text/plain, attachment)]
[emacs.exe.loadfile-distr.txt (text/plain, attachment)]
[emacs.exe.nofile-build.txt (text/plain, attachment)]
[emacs.exe.loadfile-build.txt (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19181; Package emacs. (Wed, 26 Nov 2014 11:35:02 GMT) Full text and rfc822 format available.

Message #38 received at 19181 <at> debbugs.gnu.org (full text, mbox):

From: Bill Farmer <williamjfarmer <at> yahoo.co.uk>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 19181 <at> debbugs.gnu.org, dmoncayo <at> gmail.com
Subject: Re: bug#19181: 24.4; 24.4.1 libgcc_s_dw2-1.dll crash on exit
Date: Wed, 26 Nov 2014 11:34:52 +0000
[Message part 1 (text/plain, inline)]
I have downloaded a built version of zlib1.dll from the zlib web site 
(http://zlib.net) and copied the file into the bin folder of the emacs 
24.4 distribution. This fixes the problem, as this version of zlib does 
not have a dependency on libgcc_s_dw2-1.dll.

Regards
Bill Farmer

On 26/11/2014 03:47, Eli Zaretskii wrote:
> Please try to find the DLLs loaded into the Emacs binary that does 
> crash. I don't see any other way of finding out what caused it. 
> Somewhere on your system there is a DLL that depends on 
> libgcc_s_dw2-1.dll, and finding it is the way to solve this riddle. 
> Thanks. 

[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19181; Package emacs. (Wed, 26 Nov 2014 15:56:02 GMT) Full text and rfc822 format available.

Message #41 received at 19181 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Bill Farmer <williamjfarmer <at> yahoo.co.uk>
Cc: 19181 <at> debbugs.gnu.org, dmoncayo <at> gmail.com
Subject: Re: bug#19181: 24.4; 24.4.1 libgcc_s_dw2-1.dll crash on exit
Date: Wed, 26 Nov 2014 17:55:28 +0200
> Date: Wed, 26 Nov 2014 11:34:52 +0000
> From: Bill Farmer <williamjfarmer <at> yahoo.co.uk>
> CC: dmoncayo <at> gmail.com, 19181 <at> debbugs.gnu.org
> 
> I have downloaded a built version of zlib1.dll from the zlib web site
> (http://zlib.net) and copied the file into the bin folder of the emacs 24.4
> distribution. This fixes the problem, as this version of zlib does not have a
> dependency on libgcc_s_dw2-1.dll.

Great, so your problem is solved.  I've now mentioned zlib1.dll in
etc/PROBLEMS as the potential source of such crashes.

However, I'd still like to understand why Emacs loads zlib1.dll when
you visit a file.  Could you please help me figure that out?

First, does that happen with any file, or just with a few particular
ones, and if the latter, then which files trigger that?

Second, how do you visit that file, exactly?  "C-x C-f", via the menu
bar, something else?

And finally, does Emacs load zlib1.dll if you invoke it as "emacs -Q"?
If "emacs -Q" doesn't load zlib1.dll, can you try finding the
customization in your ~/.emacs that causes this?

There are only 2 functions in core Emacs that might load zlib:
zlib-available-p and zlib-decompress-region.  So another way of
finding out why zlib is being loaded is to "M-x debug-on-entry" both
these functions, and when Emacs pops up the Lisp backtrace, see who
called them.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19181; Package emacs. (Wed, 26 Nov 2014 17:53:01 GMT) Full text and rfc822 format available.

Message #44 received at 19181 <at> debbugs.gnu.org (full text, mbox):

From: Bill Farmer <williamjfarmer <at> yahoo.co.uk>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 19181 <at> debbugs.gnu.org, dmoncayo <at> gmail.com
Subject: Re: bug#19181: 24.4; 24.4.1 libgcc_s_dw2-1.dll crash on exit
Date: Wed, 26 Nov 2014 17:52:13 +0000
[Message part 1 (text/plain, inline)]
It does not seem to make any difference what file, I was using the 
grep-changelog file in the bin folder for testing, but any text or 
source file seems to cause the problem. I was visiting the file by 
dragging and dropping it into the emacs window. Visiting a file using 
the menu or 'C-x C-f' does not cause the problem. Starting emacs with 
emacs -Q crashes if a file is visited. I have attached a traceback from 
the zlib-available-p function. I couldn't paste it here because it 
contains null characters (^@).

Regards
Bill Farmer

On 26/11/2014 15:55, Eli Zaretskii wrote:
>> Date: Wed, 26 Nov 2014 11:34:52 +0000
>> From: Bill Farmer <williamjfarmer <at> yahoo.co.uk>
>> CC: dmoncayo <at> gmail.com, 19181 <at> debbugs.gnu.org
>>
>> I have downloaded a built version of zlib1.dll from the zlib web site
>> (http://zlib.net) and copied the file into the bin folder of the emacs 24.4
>> distribution. This fixes the problem, as this version of zlib does not have a
>> dependency on libgcc_s_dw2-1.dll.
> Great, so your problem is solved.  I've now mentioned zlib1.dll in
> etc/PROBLEMS as the potential source of such crashes.
>
> However, I'd still like to understand why Emacs loads zlib1.dll when
> you visit a file.  Could you please help me figure that out?
>
> First, does that happen with any file, or just with a few particular
> ones, and if the latter, then which files trigger that?
>
> Second, how do you visit that file, exactly?  "C-x C-f", via the menu
> bar, something else?
>
> And finally, does Emacs load zlib1.dll if you invoke it as "emacs -Q"?
> If "emacs -Q" doesn't load zlib1.dll, can you try finding the
> customization in your ~/.emacs that causes this?
>
> There are only 2 functions in core Emacs that might load zlib:
> zlib-available-p and zlib-decompress-region.  So another way of
> finding out why zlib is being loaded is to "M-x debug-on-entry" both
> these functions, and when Emacs pops up the Lisp backtrace, see who
> called them.
>
> Thanks.

[Message part 2 (text/html, inline)]
[Backtrace.txt (text/plain, attachment)]

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Wed, 26 Nov 2014 18:06:02 GMT) Full text and rfc822 format available.

Notification sent to Bill Farmer <williamjfarmer <at> yahoo.co.uk>:
bug acknowledged by developer. (Wed, 26 Nov 2014 18:06:03 GMT) Full text and rfc822 format available.

Message #49 received at 19181-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Bill Farmer <williamjfarmer <at> yahoo.co.uk>
Cc: 19181-done <at> debbugs.gnu.org, dmoncayo <at> gmail.com
Subject: Re: bug#19181: 24.4; 24.4.1 libgcc_s_dw2-1.dll crash on exit
Date: Wed, 26 Nov 2014 20:05:42 +0200
> Date: Wed, 26 Nov 2014 17:52:13 +0000
> From: Bill Farmer <williamjfarmer <at> yahoo.co.uk>
> CC: dmoncayo <at> gmail.com, 19181 <at> debbugs.gnu.org
> 
> It does not seem to make any difference what file, I was using the
> grep-changelog file in the bin folder for testing, but any text or source file
> seems to cause the problem. I was visiting the file by dragging and dropping it
> into the emacs window. Visiting a file using the menu or 'C-x C-f' does not
> cause the problem. Starting emacs with emacs -Q crashes if a file is visited. I
> have attached a traceback from the zlib-available-p function. I couldn't paste
> it here because it contains null characters (^@).

OK, now everything is clear, thanks.  Drag-n-drop indeed can load
zlib1.dll, if Emacs was built with zlib support.  I'm guessing that
your own build was without zlib, so Emacs didn't load it.

I'm closing the bug.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 25 Dec 2014 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 184 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.