unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#11884: 24.1.50; a regression with pselect(2) on FreeBSD after r108687
@ 2012-07-09  3:04 Jan Beich
  2012-07-17  2:20 ` Paul Eggert
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Beich @ 2012-07-09  3:04 UTC (permalink / raw)
  To: 11884

Trying to use anything that waits for a process turns emacs into a cpu
hog, e.g. browse-url or vc-annotate. A simple test case is:

  $ emacs -Q
  (start-process "dummy" "*dummy*" "/usr/bin/true")

It does nothing on r108686 but degrades on r108707 (intermediate
revisions do not compile). list-processes still shows `true' despite the
process is long gone:

  Process [v]     Status  Buffer          TTY          Command
  dummy           run     *dummy*         /dev/pts/8   /usr/bin/true

in ktrace(1) it looks like this (repeatedly)

   911 emacs    CALL  ioctl(0x3,FIONREAD,0x7fffffffb47c)
   911 emacs    RET   ioctl 0
   911 emacs    CALL  pselect(0x5,0x7fffffffc850,0x7fffffffc7d0,0,0x7fffffffc7c0,0)
   911 emacs    RET   pselect 1
   911 emacs    CALL  ioctl(0x3,FIONREAD,0x7fffffffb46c)
   911 emacs    RET   ioctl 0
   911 emacs    CALL  read(0x4,0x7fffffffb550,0x1000)
   911 emacs    GIO   fd 4 read 0 bytes
       ""
   911 emacs    RET   read 0

--
FreeBSD 10.0-CURRENT r237800 amd64





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

* bug#11884: 24.1.50; a regression with pselect(2) on FreeBSD after r108687
  2012-07-09  3:04 bug#11884: 24.1.50; a regression with pselect(2) on FreeBSD after r108687 Jan Beich
@ 2012-07-17  2:20 ` Paul Eggert
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Eggert @ 2012-07-17  2:20 UTC (permalink / raw)
  To: Jan Beich; +Cc: Herbert J. Skuhra, 11884-done

Thanks for that bug report.  Herbert J. Skuhra also
privately reported the same bug, and was gracious enough to
give me a login on a FreeBSD host where I could reproduce
your test case and debug the problem.

I found two related bugs.  First, Emacs's 'configure' script
incorrectly assumed that pthread_sigmask wasn't working on
FreeBSD; this is fixed in Emacs trunk bzr 109107.

Second, the gnulib fallback code for pthread_sigmask
incorrectly assumed that FreeBSD's pthread_sigmask (1729,
NULL, NULL) returns a nonzero error number, which it does
not -- it returns 0.  This is arguably a POSIX-compliance
bug in FreeBSD, but a bug like this is something that should
not make Emacs hang.  This is fixed by Emacs trunk bzr
109099.

I'm marking the bug as done; please feel free to reopen it if
this fix does not work for you.

Here's some URLs if you want to see diffs:

http://bzr.savannah.gnu.org/lh/emacs/trunk/revision/109099

http://bzr.savannah.gnu.org/lh/emacs/trunk/revision/109107





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

end of thread, other threads:[~2012-07-17  2:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-09  3:04 bug#11884: 24.1.50; a regression with pselect(2) on FreeBSD after r108687 Jan Beich
2012-07-17  2:20 ` Paul Eggert

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).