unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#11701: 24.1.50; SIGBUS in libMagickCore when reconverting pdf files in doc-view-mode
@ 2012-06-13 22:15 Andreas Politz
  2019-08-17 22:08 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Politz @ 2012-06-13 22:15 UTC (permalink / raw)
  To: 11701

When reverting a doc-view buffer, Emacs crashes receiving a SIGBUS error
(below is a back-trace).  I am not able to reproduce it without loading
my init file, but am able to reproduce it on a certain file constantly
otherwise.

The crash happens after doc-view deletes its cache files in
`doc-view-reconvert-doc' and starts to convert the PDF pages to PNG
files (and indirectly calling functions in the magick library).  It
seems that the deleted file is still mmapped and accessed in the library
at this point, leading to the error.

A. Politz

Program received signal SIGBUS, Bus error.
0x00007ffff44d99af in CopyMagickMemory () from /usr/lib/libMagickCore.so.3
(gdb) quit\b\b\b\b[K^[[K(gdb) bt
#0  0x00007ffff44d99af in CopyMagickMemory () from /usr/lib/libMagickCore.so.3
#1  0x00007ffff4419704 in ReadBlob () from /usr/lib/libMagickCore.so.3
#2  0x00007fffeb10068e in ?? () from /usr/lib/ImageMagick-6.6.0/modules-Q16/coders/png.so
#3  0x00007ffff5bccb3e in ?? () from /lib/libpng12.so.0
#4  0x00007ffff5bcdbf3 in ?? () from /lib/libpng12.so.0
#5  0x00007ffff5bd5b53 in png_read_row () from /lib/libpng12.so.0
#6  0x00007fffeb0ffcd5 in ?? () from /usr/lib/ImageMagick-6.6.0/modules-Q16/coders/png.so
#7  0x00007fffeb100184 in ?? () from /usr/lib/ImageMagick-6.6.0/modules-Q16/coders/png.so
#8  0x00007ffff4447d6e in ReadImage () from /usr/lib/libMagickCore.so.3
#9  0x00000000004e18f1 in imagemagick_load_image (f=0x1062ba0, img=0x234a3d0, contents=<value optimized out>, size=<value optimized out>,
    filename=<value optimized out>) at image.c:7681
#10 0x00000000004e851e in lookup_image (f=0x1062ba0, spec=36259398) at image.c:1733
#11 0x000000000044858d in handle_single_display_spec (it=0x7fffffff64c0, spec=36259398, object=34698469, overlay=<value optimized out>,
    position=0x7fffffff6608, bufpos=<value optimized out>, display_replaced_p=0, frame_window_p=1) at xdisp.c:4926
#12 0x0000000000448fa1 in handle_display_spec (it=0x7fffffff64c0, spec=36259398, object=34698469, overlay=<value optimized out>,
    position=<value optimized out>, bufpos=<value optimized out>, frame_window_p=1) at xdisp.c:4453
#13 0x000000000044916c in handle_display_prop (it=0x7fffffff64c0) at xdisp.c:4376
#14 0x000000000043731f in handle_stop (it=0x7fffffff64c0) at xdisp.c:3154
#15 0x00000000004375d8 in reseat (it=0x7fffffff64c0, pos=..., force_p=1) at xdisp.c:6167
#16 0x000000000044a5ad in start_display (it=0x7fffffff64c0, w=0x7ffff7e19097, pos=...) at xdisp.c:2867
#17 0x0000000000452b8c in try_window (window=<value optimized out>, pos=..., flags=1) at xdisp.c:16148
#18 0x00000000004578f5 in redisplay_window (window=<value optimized out>, just_this_one_p=<value optimized out>) at xdisp.c:15678
#19 0x0000000000459a84 in redisplay_window_0 (window=140737488293088) at xdisp.c:13760
#20 0x0000000000577179 in internal_condition_case_1 (bfun=<value optimized out>, arg=<value optimized out>, handlers=<value optimized out>,
    hfun=<value optimized out>) at eval.c:1486
#21 0x000000000043c9ae in redisplay_windows (window=140737352142999) at xdisp.c:13740
#22 0x000000000043c9d0 in redisplay_windows (window=140737352142999) at xdisp.c:13734
#23 0x000000000045a721 in redisplay_internal () at xdisp.c:13313
#24 0x000000000045b2d3 in redisplay_preserve_echo_area (from_where=-62240) at xdisp.c:13568
#25 0x00000000005b3ee2 in wait_reading_process_output (time_limit=<value optimized out>, microsecs=<value optimized out>, read_kbd=-1,
    do_display=1, wait_for_cell=11954562, wait_proc=<value optimized out>, just_wait_proc=0) at process.c:4478
#26 0x0000000000419564 in sit_for (timeout=180, reading=1, do_display=1) at dispnew.c:6068
#27 0x000000000050d8ab in read_char (commandflag=<value optimized out>, nmaps=<value optimized out>, maps=0x0, prev_event=<value optimized out>,
    used_mouse_menu=<value optimized out>, end_time=<value optimized out>) at keyboard.c:2698
#28 0x000000000050e6c0 in read_key_sequence (keybuf=<value optimized out>, bufsize=<value optimized out>, prompt=<value optimized out>,
    dont_downcase_last=<value optimized out>, can_return_switch_frame=<value optimized out>, fix_current_buffer=<value optimized out>)
    at keyboard.c:9344
#29 0x000000000051081b in command_loop_1 () at keyboard.c:1455
#30 0x00000000005772d1 in internal_condition_case (bfun=<value optimized out>, handlers=<value optimized out>, hfun=<value optimized out>)
    at eval.c:1448
#31 0x000000000050a52e in command_loop_2 (ignore=<value optimized out>) at keyboard.c:1160
#32 0x00000000005773f8 in internal_catch (tag=<value optimized out>, func=<value optimized out>, arg=<value optimized out>) at eval.c:1205
#33 0x000000000050abea in command_loop () at keyboard.c:1139
#34 recursive_edit_1 () at keyboard.c:759
#35 0x000000000050acfd in Frecursive_edit () at keyboard.c:823
#36 0x00000000004fd480 in main (argc=0, argv=0x7fffffffe458) at emacs.c:1711



In GNU Emacs 24.1.50.1 (x86_64-pc-linux-gnu, GTK+ Version 2.20.1)
 of 2012-06-05 on cw-bkp0, modified by Debian
 (emacs-snapshot package, version 2:20120524-1+squeeze)
Windowing system distributor `The X.Org Foundation', version 11.0.10707000
Configured using:
 `configure '--build' 'x86_64-linux-gnu' '--host' 'x86_64-linux-gnu'
 '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib'
 '--localstatedir=/var' '--infodir=/usr/share/info'
 '--mandir=/usr/share/man' '--with-pop=yes'
 '--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/24.1.50/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.1.50/site-lisp:/usr/share/emacs/site-lisp'
 '--without-compress-info' '--with-crt-dir=/usr/lib//' '--with-x=yes'
 '--with-x-toolkit=gtk' '--with-imagemagick=yes'
 'build_alias=x86_64-linux-gnu' 'host_alias=x86_64-linux-gnu'
 'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2' 'LDFLAGS=-g
 -Wl,--as-needed -znocombreloc' 'CPPFLAGS=''

Important settings:
  value of $LC_ALL: C
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: de_DE.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: nil
  default enable-multibyte-characters: t

Major mode: Emacs-Lisp

Minor modes in effect:
  cl-format-font-lock-mode: t
  iswitchb-mode: t
  ispell-track-input-method: t
  recentf-mode: t
  yas/global-mode: t
  yas/minor-mode: t
  workgroups-mode: t
  window-numbering-mode: t
  shell-dirtrack-mode: t
  TeX-PDF-mode: t
  savehist-mode: t
  outline-minor-mode: t
  ekey-mode: t
  eldoc-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t
  view-mode: t

Recent input:
C-, M-g M-p <return> C-x 1 C-x k <return> C-, g d o 
c - v i e w - d i s <tab> M-b u <tab> - <tab> M-h i 
- <tab> <return> C-c i c o n v e r t <tab> - c u <tab> 
<return> C-M-l C-M-l C-s p d f - M-m M-f C-c i <return> 
C-l C-l C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n M-f 
C-c i <return> C-n C-n C-n M-f C-c i <return> C-x b 
C-g C-x C-g M-x r e p o r <tab> b <backspace> b u g 
<return>

Recent messages:
Invalid face reference: nil [36 times]
uncompressing doc-view.el.gz...done
Note: file is write protected
View mode: type C-h for help, h for commands, q to quit.
Making completion list...
Mark set
Mark saved where search started
Mark set [3 times]
Quit
No expansion found

Load-path shadows:
/home/politza/.emacs.d/plugins/predictive/pos-tip hides /home/politza/.emacs.d/plugins/pos-tip
/home/politza/.emacs.d/plugins/haskell/haskell-cabal hides /usr/share/emacs/site-lisp/haskell-mode/haskell-cabal
/home/politza/.emacs.d/plugins/haskell/haskell-doc hides /usr/share/emacs/site-lisp/haskell-mode/haskell-doc
/home/politza/.emacs.d/plugins/haskell/haskell-mode hides /usr/share/emacs/site-lisp/haskell-mode/haskell-mode
/home/politza/.emacs.d/plugins/haskell/haskell-c hides /usr/share/emacs/site-lisp/haskell-mode/haskell-c
/home/politza/.emacs.d/plugins/haskell/haskell-indentation hides /usr/share/emacs/site-lisp/haskell-mode/haskell-indentation
/home/politza/.emacs.d/plugins/haskell/haskell-site-file hides /usr/share/emacs/site-lisp/haskell-mode/haskell-site-file
/home/politza/.emacs.d/plugins/haskell/haskell-ghci hides /usr/share/emacs/site-lisp/haskell-mode/haskell-ghci
/home/politza/.emacs.d/plugins/haskell/inf-haskell hides /usr/share/emacs/site-lisp/haskell-mode/inf-haskell
/home/politza/.emacs.d/plugins/haskell/haskell-hugs hides /usr/share/emacs/site-lisp/haskell-mode/haskell-hugs
/home/politza/.emacs.d/plugins/haskell/haskell-font-lock hides /usr/share/emacs/site-lisp/haskell-mode/haskell-font-lock
/home/politza/.emacs.d/plugins/haskell/haskell-simple-indent hides /usr/share/emacs/site-lisp/haskell-mode/haskell-simple-indent
/home/politza/.emacs.d/plugins/haskell/haskell-decl-scan hides /usr/share/emacs/site-lisp/haskell-mode/haskell-decl-scan
/home/politza/.emacs.d/plugins/haskell/haskell-indent hides /usr/share/emacs/site-lisp/haskell-mode/haskell-indent
/home/politza/.emacs.d/plugins/haskell/haskell-decl-scan hides /usr/share/emacs/24.1.50/site-lisp/haskell-mode/haskell-decl-scan
/home/politza/.emacs.d/plugins/haskell/haskell-c hides /usr/share/emacs/24.1.50/site-lisp/haskell-mode/haskell-c
/home/politza/.emacs.d/plugins/haskell/haskell-ghci hides /usr/share/emacs/24.1.50/site-lisp/haskell-mode/haskell-ghci
/home/politza/.emacs.d/plugins/haskell/haskell-doc hides /usr/share/emacs/24.1.50/site-lisp/haskell-mode/haskell-doc
/home/politza/.emacs.d/plugins/haskell/haskell-indent hides /usr/share/emacs/24.1.50/site-lisp/haskell-mode/haskell-indent
/home/politza/.emacs.d/plugins/haskell/haskell-mode hides /usr/share/emacs/24.1.50/site-lisp/haskell-mode/haskell-mode
/home/politza/.emacs.d/plugins/haskell/haskell-hugs hides /usr/share/emacs/24.1.50/site-lisp/haskell-mode/haskell-hugs
/home/politza/.emacs.d/plugins/haskell/haskell-site-file hides /usr/share/emacs/24.1.50/site-lisp/haskell-mode/haskell-site-file
/home/politza/.emacs.d/plugins/haskell/haskell-cabal hides /usr/share/emacs/24.1.50/site-lisp/haskell-mode/haskell-cabal
/home/politza/.emacs.d/plugins/haskell/inf-haskell hides /usr/share/emacs/24.1.50/site-lisp/haskell-mode/inf-haskell
/home/politza/.emacs.d/plugins/haskell/haskell-font-lock hides /usr/share/emacs/24.1.50/site-lisp/haskell-mode/haskell-font-lock
/home/politza/.emacs.d/plugins/haskell/haskell-simple-indent hides /usr/share/emacs/24.1.50/site-lisp/haskell-mode/haskell-simple-indent
/home/politza/.emacs.d/plugins/haskell/haskell-indentation hides /usr/share/emacs/24.1.50/site-lisp/haskell-mode/haskell-indentation
/usr/share/emacs/24.1.50/site-lisp/cscope/xcscope hides /usr/share/emacs/site-lisp/xcscope
/usr/share/emacs/24.1.50/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup
/home/politza/.emacs.d/plugins/term hides /usr/share/emacs/24.1.50/lisp/term
/usr/share/emacs/site-lisp/remember-el/remember hides /usr/share/emacs/24.1.50/lisp/textmodes/remember
/home/politza/.emacs.d/plugins/python/python/python hides /usr/share/emacs/24.1.50/lisp/progmodes/python
/home/politza/.emacs.d/plugins/predictive/avl-tree hides /usr/share/emacs/24.1.50/lisp/emacs-lisp/avl-tree
/home/politza/.emacs.d/plugins/python/python/sym-comp hides /usr/share/emacs/24.1.50/lisp/obsolete/sym-comp

Features:
(shadow mail-extr emacsbug message rfc822 mml mml-sec mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
sendmail rfc2047 rfc2045 ietf-drums mail-utils multi-isearch reposition
imenu find-func vc-dispatcher vc-svn pdftk-outline autorevert doc-view
jka-compr image-mode cl-format cl-format-builtins clisp-format
cl-format-def emacs-customizations nogroup-customizations
wp-customizations view-customizations tex-customizations
reftex-customizations reftex-miscellaneous-configurations-customizations
reftex-label-support-customizations
reftex-defining-label-environments-customizations AUCTeX-customizations
preview-customizations preview-appearance-customizations
TeX-parse-customizations TeX-command-customizations
TeX-view-customizations table-customizations table-hooks-customizations
outlines-customizations programming-customizations tools-customizations
vc-customizations makefile-customizations ediff-customizations
ediff-window-customizations languages-customizations
matlab-customizations python-customizations haskell-customizations
c-customizations multimedia-customizations image-customizations
help-customizations ekey-customizations info-lookup-customizations
info-customizations customize-customizations
custom-buffer-customizations apropos-customizations help-mode view
files-customizations uniquify-customizations uniquify
sunrise-customizations recentf-customizations find-file-customizations
backup-customizations external-customizations server-customizations
processes-customizations shell-customizations gud-customizations
tooltip-customizations grep-customizations compilation-customizations
comint-customizations man-customizations environment-customizations
windows-customizations minibuffer-customizations savehist-customizations
menu-customizations initialization-customizations dired-customizations
dired-x-customizations dired-details-customizations
editing-customizations yasnippet-customizations matching-customizations
paren-matching-customizations paren-showing-customizations
isearch-customizations bookmark-customizations killing-customizations
indent-customizations emulations-customizations
editing-basics-customizations development-customizations
lisp-customizations re-builder-customizations
inferior-lisp-customizations ielm-customizations ert-customizations
edebug-customizations bytecomp-customizations advice-customizations
extensions-customizations eldoc-customizations cust-print-customizations
data-customizations save-place-customizations convenience-customizations
workgroups-customizations window-numbering-customizations
pabbrev-customizations kmacro-customizations imenu-customizations
ibuffer-customizations hippie-expand-customizations ffap-customizations
completion-customizations iswitchb-customizations iswitchb
auto-complete-customizations auto-revert-customizations
comm-customizations tramp-customizations browse-url-customizations
applications-customizations mediawiki-customizations w3m-customizations
package-customizations mail-customizations smtpmail-customizations
sendmail-customizations ispell-customizations doc-view-customizations
calendar-customizations org-customizations org-structure-customizations
org-plain-lists-customizations org-edit-structure-customizations
org-startup-customizations org-link-customizations
org-latex-customizations org-appearance-customizations
calc-customizations server recentf tree-widget yasnippet dropdown-list
workgroups bookmark pp window-numbering w3m browse-url timezone w3m-hist
w3m-e23 w3m-ccl ccl w3m-fsf w3m-favicon w3m-image w3m-proc w3m-util
tramp tramp-compat shell tramp-loaddefs tex saveplace savehist reftex
reftex-vars pabbrev thingatpt org ob-emacs-lisp ob-tangle ob-ref ob-lob
ob-table org-footnote org-src ob-comint ob-keys ob ob-eval org-pcomplete
pcomplete org-list org-faces org-compat org-entities org-macs noutline
outline format-spec cal-menu calendar cal-loaddefs lib-kbd lib-isearch
lib-basic lib-lispext info-look hippie-exp grep compile comint
ansi-color eldoc-eval ekey easy-mmode assoc dired-details+ warnings
dired-details anticus edmacro kmacro derived ffap url-parse auth-source
eieio byte-opt bytecomp byte-compile cconv macroexp gnus-util mm-util
mail-prsvr password-cache url-vars eldoc cus-edit cus-start cus-load
wid-edit cl all-autoloads auctex-autoloads tex-site info
browse-kill-ring-autoloads c-eldoc-autoloads cl-format-autoloads
company-autoloads eldoc-eval-autoloads sunrise-x-loop-autoloads
sunrise-x-loop sunrise-commander advice help-fns advice-preload term
ehelp electric ring sort find-dired disp-table enriched dired-x easymenu
dired sunrise-commander-autoloads package remember-autoloads
planner-autoloads w3m-load muse-autoloads time-date tooltip ediff-hook
vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list newcomment lisp-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 loaddefs
button faces cus-face files text-properties overlay sha1 md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process dbusbind dynamic-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#11701: 24.1.50; SIGBUS in libMagickCore when reconverting pdf files in doc-view-mode
  2012-06-13 22:15 bug#11701: 24.1.50; SIGBUS in libMagickCore when reconverting pdf files in doc-view-mode Andreas Politz
@ 2019-08-17 22:08 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2019-08-17 22:08 UTC (permalink / raw)
  To: Andreas Politz; +Cc: 11701

Andreas Politz <politza@fh-trier.de> writes:

> When reverting a doc-view buffer, Emacs crashes receiving a SIGBUS error
> (below is a back-trace).  I am not able to reproduce it without loading
> my init file, but am able to reproduce it on a certain file constantly
> otherwise.
>
> The crash happens after doc-view deletes its cache files in
> `doc-view-reconvert-doc' and starts to convert the PDF pages to PNG
> files (and indirectly calling functions in the magick library).  It
> seems that the deleted file is still mmapped and accessed in the library
> at this point, leading to the error.
>
> A. Politz
>
> Program received signal SIGBUS, Bus error.
> 0x00007ffff44d99af in CopyMagickMemory () from /usr/lib/libMagickCore.so.3
> (gdb) quit\b\b\b\b[K(gdb) bt
> #0  0x00007ffff44d99af in CopyMagickMemory () from /usr/lib/libMagickCore.so.3
> #1  0x00007ffff4419704 in ReadBlob () from /usr/lib/libMagickCore.so.3
> #2  0x00007fffeb10068e in ?? () from /usr/lib/ImageMagick-6.6.0/modules-Q16/coders/png.so

(I'm going through old bug reports that have unfortunately gotten no
responses yet.)

This crash wasn't handled at the time, and as this was reported more
than seven years ago, I don't think there's much chance of making any
progress here, so I'm closing this bug report.  If you're still seeing
similar crashes in modern Emacs versions, please reopen.

(And Emacs 27, by default, isn't built with ImageMagick support, so
these types of crashes are less likely now.)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-08-17 22:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-13 22:15 bug#11701: 24.1.50; SIGBUS in libMagickCore when reconverting pdf files in doc-view-mode Andreas Politz
2019-08-17 22:08 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).