Re: infloop in python code
On 4/9/07, Stefan Monnier <[EMAIL PROTECTED]> wrote: I assume this is using Emacs's own python.el, not python-mode.el, right? yes. Try to trim down your customization to the smallest one with which you can still reproduce the problem. thanks, that did the trick, see my other post. ___ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
Re: infloop in python code
Benjamin Rutt osu.edu> writes: > Is there anything I can do to make this report more useful? It doesn't happen > with emacs -q unfortunately. hoorah, I can now dupe it with command line emacs -q --eval '(add-hook (quote python-mode-hook) (lambda () (imenu-add-menubar-index)))' --eval '(setq imenu-auto-rescan t)' bugreport.py so imenu is implicated. can anyone else dupe it now? ___ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
infloop in python code
In GNU Emacs 22.0.97.2 (sparc-sun-solaris2.8, X toolkit) of 2007-04-08 on xxx Windowing system distributor `The Cygwin/X Project', version 11.0.60899901 configured using `configure '--prefix=/home/ruttbe/.upak-jade/installed/emacs22-pretest'' 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: nil locale-coding-system: nil default-enable-multibyte-characters: t Major mode: Python Minor modes in effect: show-paren-mode: t minibuffer-electric-default-mode: t auto-image-file-mode: t global-auto-revert-mode: t recentf-mode: t display-time-mode: t iswitchb-mode: t shell-dirtrack-mode: t tooltip-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t unify-8859-on-encoding-mode: t utf-translate-cjk-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t abbrev-mode: t Emacs infloops when I press the " key at the end of this line (to the right of the last '(': matching_dbs = commands.getoutput("""cat //xx/x/x.xxx | grep "^%s" | grep -v xxx""" % region).strip().split( in the full file: [EMAIL PROTECTED] ruttbe]$ cat bugreport.py #!/usr/bin/env python import os, os.path, sys, re, commands, logging, tempfile, datetime import socket, string, random, time, traceback, shutil, threading, Queue from subprocess import * colos = [ "abc","abc", "abc","abc", "abc","abc", "abc","abc", "abc","abc", "abc","abc" ] mains = ["abc","abc"] print mains+colos d = '/tmp/-x' if not os.access(d,os.F_OK): os.mkdir(d) from twisted.python.threadpool import * tp = ThreadPool() tp.adjustPoolsize(1,1) q = Queue.Queue() def handle_region(region): f = open(os.path.join(d,region), "a") t1 = time.time() # pressing " key to the right of the trailing ( on the next line causes infinite loop matching_dbs = commands.getoutput("""cat //xx/x/x.xxx | grep "^%s" | grep -v xxx""" % region).strip().split( cmd = """xxx--xx-xxx %s""" % (' '.join(['"%s"' % (x) for x in matching_dbs])) print cmd p = Popen(cmd, shell=True, stdin=PIPE, stdout=PIPE, stderr=STDOUT) (cout, cin) = (p.stdout, p.stdin) cin.close() for line in cout: f.write(line) f.flush() # if line.find('WARNING') != -1: # print line, print line, cout.close() rc = p.wait() t2 = time.time() if rc: f.write('ERROR: %d calling %s\n' % (rc, cmd)) f.write('--- elapsed seconds: %.1f\n' % (t2-t1)) f.close() q.put(region) # tp.dispatch(None, handle_region, region) for region in mains+colos: tp.dispatch(None, handle_region, region) tp.start() try: while 1: region = q.get() tp.dispatch(None, handle_region, region) except Exception, ex: traceback.print_exc() tp.stop() [EMAIL PROTECTED] ruttbe]$ Here is a debugging session that shows it (I Ctrl-C after it infloops, then hit next a bunch of times, hoping it helps): [EMAIL PROTECTED] ruttbe]$ dbx -c 'runargs bugreport.py; run' /home/ruttbe/.upak-jade/commons/bin/emacs Reading emacs Reading ld.so.1 Reading libXaw.so.5 Reading libXmu.so.4 Reading libXt.so.4 Reading libSM.so.6 Reading libICE.so.6 Reading libXext.so.0 Reading libpng12.so.0 Reading libz.so.1 Reading libm.so.1 Reading libX11.so.4 Reading libsocket.so.1 Reading libnsl.so.1 Reading libkstat.so.1 Reading libcurses.so.1 Reading libc.so.1 Reading libdl.so.1 Reading libucb.so.1 Reading libresolv.so.2 Reading libelf.so.1 Reading libmp.so.2 Reading libc_psr.so.1 Running: emacs bugreport.py (process id 18604) Reading nss_files.so.1 Reading nss_dns.so.1 ^Cdbx: warning: Interrupt ignored but forwarded to child. signal INT (Interrupt) in forw_comment at line 1924 in file "syntax.c" dbx: warning: can't find file "/var/tmp/upak-tmp-emacs22-pretest-wS1zon/emacs-22.0.97/src/syntax.c" dbx: warning: see `help finding-files' (dbx) pathmap /var/tmp/upak-tmp-emacs22-pretest-wS1zon /home/ruttbe/tmp (dbx) list 1924 c = FETCH_CHAR (from_byte); 1925 syntax = SYNTAX_WITH_FLAGS (c); 1926 code = syntax & 0xff; 1927 if (code == Sendcomment 1928 && SYNTAX_FLAGS_COMMENT_STYLE (syntax) == style 1929 && (SYNTAX_FLAGS_COMMENT_NESTED (syntax) ? 1930 (nesting > 0 && --nesting == 0) : nesting < 0)) 1931 /* we have encountered a comment end of the same style 1932 as the comment sequence which began this comment 1933 section */ (dbx) where =>[1] forw_comment(from = ???, from_byte = ???, stop = ???, nesting = ???, style = ???, prev_syntax = ???, ch
Re: emacs server fails to start with large uid on unix
Stefan Monnier iro.umontreal.ca> writes: > > > Please install that fix too. Please also look at the Lisp Manual > > docs for file-attributes, in case that also need fixing. > > I installed all my fixes. I believe it should now work, although I'm sure > there are still many spots left were similar problems can show up. I finally rebuilt emacs from cvs and am happy to report that the problems I started this thread with are fixed under emacs -q ! Thanks for the help everyone. ___ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
Re: emacs server fails to start with large uid on unix
Stefan Monnier iro.umontreal.ca> writes: > Does the patch below help? Not really. The following expression shows the problem: (let ((dir server-socket-dir)) (setq dir (directory-file-name dir)) (message "%s" (file-attributes dir))) When eval'd it comes up with: "(t 2 263283958 705 (17826 29767) (17826 27012) (17826 27012) 117 drwx-- nil 110835300 2)" Look at the caddr field. However, my uid is: $ id uid=800154870(ruttbe) gid=705(www) I think that number is too large for an emacs int. So the problem is in `file-attributes' then, I think. --BR ___ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
Re: emacs server fails to start with large uid on unix
Richard Stallman gnu.org> writes: > > Does this fix it? Yes, it fixes part of the problem. But the next bug is revealed when I use your fix: [EMAIL PROTECTED] emacs]$ \rm -fr /tmp/emacs800154870/ [EMAIL PROTECTED] emacs]$ cat fixsrvbug.el (defvar server-socket-dir (let ((uid (user-uid))) (if (floatp uid) (format "/tmp/emacs%1.0f" uid) (format "/tmp/emacs%d" uid (require 'server) (server-ensure-safe-dir server-socket-dir) [EMAIL PROTECTED] emacs]$ emacs -f toggle-debug-on-error -q -l fixsrvbug.el [... produces this stacktrace: ] Debugger entered--Lisp error: (error "The directory /tmp/emacs800154870 is unsafe") signal(error ("The directory /tmp/emacs800154870 is unsafe")) error("The directory %s is unsafe" "/tmp/emacs800154870") server-ensure-safe-dir("/tmp/emacs800154870") eval-buffer(# nil "/home/ruttbe/emacs/fixsrvbug.el" nil t) ; Reading at buffer position 203 load-with-code-conversion ("/home/ruttbe/emacs/fixsrvbug.el" "/home/ruttbe/emacs/fixsrvbug.el" nil t) load("/home/ruttbe/emacs/fixsrvbug.el" nil t) command-line-1(("-f" "toggle-debug-on-error" "-l" "fixsrvbug.el")) command-line() normal-top-level() [EMAIL PROTECTED] emacs]$ ls -al /tmp/emacs800154870/ total 64 drwx-- 2 ruttbe www 117 Jan 8 10:55 ./ drwxrwxrwt 39 root sys20552 Jan 8 10:55 ../ I think that it's due to some problem in `file-attributes' based on stepping through previously with edebug but I cannot use edebug now via C-u C-M-x on `server-ensure-safe-dir' in server.el.gz for some reason (I get error edebug- syntax-error: Invalid read syntax: "Expected lambda expression") and at the same time the cursor is put at the following place: (letf (((default-file-modes) ?\700)) (make-directory dir t)) ^ | | Any help is appreciated. Thanks. --BR ___ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
emacs server fails to start with large uid on unix
I have a large unix uid: $ id uid=800154870(ruttbe) gid=705(www) it seems the emacs server of pretest 92 can't cope with this, possibly b/c of the limit on emacs lisp's integer size. perhaps calc should be used, as it can handle bignums? also `file-attributes' may have a problem with this large UID. see the backtrace upon M-x server-start after an emacs -q: Debugger entered--Lisp error: (range-error "truncate" 800154870.0) format("/tmp/emacs%d" 800154870.0) byte-code("=8c1=8c2!=88=..." [current-load-list make-variable-buffer-local server-existing-buffer server-name default-boundp set-default "server" server- socket-dir format "/tmp/emacs%d" user-uid] 5) execute-extended-command(nil) call-interactively(execute-extended-command) Thanks, --BR In GNU Emacs 22.0.92.2 (sparc-sun-solaris2.8, X toolkit) of 2007-01-03 on .com X server distributor `The Cygwin/X Project', version 11.0.60899901 configured using `configure '--prefix=/home/ruttbe/.upak- jade/installed/emacs22-pretest'' 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: nil locale-coding-system: nil default-enable-multibyte-characters: t Major mode: Debugger Minor modes in effect: tooltip-mode: t tool-bar-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t unify-8859-on-encoding-mode: t utf-translate-cjk-mode: t auto-compression-mode: t line-number-mode: t Recent input: M-x s e r v e s t M-! i d M-x r e p o r t - e m Recent messages: For information about the GNU Project and its goals, type C-h C-p. Debug on Error enabled globally For information about the GNU Project and its goals, type C-h C-p. Loading server... Loading debug...done Entering debugger... uid=800154870(ruttbe) gid=705(www) Loading emacsbug... Loading regexp-opt...done Loading emacsbug...done ___ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug