Mail Archives: cygwin/2012/07/26/03:05:48
The following maxima session encounters an EACCESS error that I can't
make sense of:
(%i1) m: genmatrix (lambda([i,j], i+j-1), 3, 3)$
(%i2) write_data(m, "/dev/stdout")$
Maxima encountered a Lisp error:
UNIX error 13 (EACCES): Permission denied
Automatically continuing.
To enable the Lisp debugger set *debugger-hook* to nil.
(%i3)
The strace corresponding to opening /dev/stdout looks normal to me up until the
write fails:
72 28729956 [main] lisp 196 normalize_posix_path: src /dev/.
25 28729981 [main] lisp 196 normalize_posix_path: /dev/ =
normalize_posix_path (/dev/.)
24 28730005 [main] lisp 196 mount_info::conv_to_win32_path:
conv_to_win32_path (/dev)
25 28730030 [main] lisp 196 set_flags: flags: binary (0x2)
22 28730052 [main] lisp 196 mount_info::conv_to_win32_path: src_path /dev,
dst C:\Programs\Cygwin\dev, flags 0x3000A, rc 0
112 28730164 [main] lisp 196 symlink_info::check: 0x0 = NtCreateFile
(\??\C:\Programs\Cygwin\dev)
45 28730209 [main] lisp 196 symlink_info::check: not a symlink
47 28730256 [main] lisp 196 symlink_info::check: 0 =
symlink.check(C:\Programs\Cygwin\dev, 0xDC15C0) (0x3000A)
37 28730293 [main] lisp 196 lstat64: entering
25 28730318 [main] lisp 196 normalize_posix_path: src /dev/stdout
21 28730339 [main] lisp 196 normalize_posix_path: /dev/stdout =
normalize_posix_path (/dev/stdout)
22 28730361 [main] lisp 196 mount_info::conv_to_win32_path:
conv_to_win32_path (/dev/stdout)
38 28730399 [main] lisp 196 set_flags: flags: binary (0x2)
23 28730422 [main] lisp 196 mount_info::conv_to_win32_path: src_path
/dev/stdout, dst C:\Programs\Cygwin\dev\stdout, flags 0x3000A, rc 0
67 28730489 [main] lisp 196 symlink_info::check: 0x0 = NtCreateFile
(\??\C:\Programs\Cygwin\dev\stdout)
149 28730638 [main] lisp 196 symlink_info::check: 15 =
symlink.check(C:\Programs\Cygwin\dev\stdout, 0xDC1700) (0x43000B)
32 28730670 [main] lisp 196 path_conv::check:
this->path(C:\Programs\Cygwin\dev\stdout), has_acls(1)
31 28730701 [main] lisp 196 build_fh_pc: fh 0x612883D0, dev 0xC3
25 28730726 [main] lisp 196 stat_worker: (\??\C:\Programs\Cygwin\dev\stdout,
0xDC3B30, 0x612883D0), file_attributes 4
73 28730799 [main] lisp 196 cygpsid::debug_print: get_sids_info: owner SID =
S-1-5-21-2052111302-842925246-682003330-75441
26 28730825 [main] lisp 196 cygpsid::debug_print: get_sids_info: group SID =
S-1-5-21-2052111302-842925246-682003330-513
24 28730849 [main] lisp 196 get_info_from_sd: uid 85441, gid 10513
40 28730889 [main] lisp 196 fhandler_base::fstat_helper: 0 = fstat
(\??\C:\Programs\Cygwin\dev\stdout, 0xDC3B30) st_size=15, st_mode=0xA1FF,
st_ino=281474978421744st_atim=4FBF6387.DB7D74 st_ctim=4FBF6387.DB7D74
st_mtim=4FBF6387.DB7D74 st_birthtim=4FBF6387.DB7D74
29 28730918 [main] lisp 196 stat_worker: 0 =
(\??\C:\Programs\Cygwin\dev\stdout,0xDC3B30)
51 28730969 [main] lisp 196 normalize_posix_path: src /dev/stdout
23 28730992 [main] lisp 196 normalize_posix_path: /dev/stdout =
normalize_posix_path (/dev/stdout)
22 28731014 [main] lisp 196 mount_info::conv_to_win32_path:
conv_to_win32_path (/dev/stdout)
22 28731036 [main] lisp 196 set_flags: flags: binary (0x2)
22 28731058 [main] lisp 196 mount_info::conv_to_win32_path: src_path
/dev/stdout, dst C:\Programs\Cygwin\dev\stdout, flags 0x3000A, rc 0
63 28731121 [main] lisp 196 symlink_info::check: 0x0 = NtCreateFile
(\??\C:\Programs\Cygwin\dev\stdout)
133 28731254 [main] lisp 196 symlink_info::check: 15 =
symlink.check(C:\Programs\Cygwin\dev\stdout, 0xDC16B0) (0x3000B)
28 28731282 [main] lisp 196 path_conv::check: this->path(/proc/self/fd/1),
has_acls(1)
35 28731317 [main] lisp 196 normalize_posix_path: src /proc/self/fd/.
23 28731340 [main] lisp 196 normalize_posix_path: /proc/self/fd/ =
normalize_posix_path (/proc/self/fd/.)
22 28731362 [main] lisp 196 mount_info::conv_to_win32_path:
conv_to_win32_path (/proc/self/fd)
24 28731386 [main] lisp 196 fhandler_proc::get_proc_fhandler:
get_proc_fhandler(/proc/self/fd)
23 28731409 [main] lisp 196 set_flags: flags: binary (0x2)
21 28731430 [main] lisp 196 mount_info::conv_to_win32_path: src_path
/proc/self/fd, dst /proc/self/fd, flags 0x2, rc 0
28 28731458 [main] lisp 196 build_fh_pc: fh 0x612883D0, dev 0xFF
24 28731482 [main] lisp 196 fhandler_proc::exists: exists (/proc/self/fd)
24 28731506 [main] lisp 196 mount_info::conv_to_win32_path:
conv_to_win32_path (/proc/self)
22 28731528 [main] lisp 196 fhandler_proc::get_proc_fhandler:
get_proc_fhandler(/proc/self)
21 28731549 [main] lisp 196 set_flags: flags: binary (0x2)
21 28731570 [main] lisp 196 mount_info::conv_to_win32_path: src_path
/proc/self, dst /proc/self, flags 0x2, rc 0
25 28731595 [main] lisp 196 build_fh_pc: fh 0x612883D0, dev 0xFF
22 28731617 [main] lisp 196 fhandler_proc::exists: exists (/proc/self)
21 28731638 [main] lisp 196 getpid: 196 = getpid()
25 28731663 [main] lisp 196 normalize_posix_path: src /proc/196/fd
21 28731684 [main] lisp 196 normalize_posix_path: /proc/196/fd =
normalize_posix_path (/proc/196/fd)
22 28731706 [main] lisp 196 mount_info::conv_to_win32_path:
conv_to_win32_path (/proc/196/fd)
21 28731727 [main] lisp 196 fhandler_proc::get_proc_fhandler:
get_proc_fhandler(/proc/196/fd)
22 28731749 [main] lisp 196 set_flags: flags: binary (0x2)
24 28731773 [main] lisp 196 mount_info::conv_to_win32_path: src_path
/proc/196/fd, dst /proc/196/fd, flags 0x2, rc 0
25 28731798 [main] lisp 196 build_fh_pc: fh 0x612883D0, dev 0xFE
22 28731820 [main] lisp 196 fhandler_process::exists: exists (/proc/196/fd)
31 28731851 [main] lisp 196 lstat64: entering
22 28731873 [main] lisp 196 normalize_posix_path: src /proc/196/fd/1
21 28731894 [main] lisp 196 normalize_posix_path: /proc/196/fd/1 =
normalize_posix_path (/proc/196/fd/1)
21 28731915 [main] lisp 196 mount_info::conv_to_win32_path:
conv_to_win32_path (/proc/196/fd/1)
23 28731938 [main] lisp 196 fhandler_proc::get_proc_fhandler:
get_proc_fhandler(/proc/196/fd/1)
42 28731980 [main] lisp 196 set_flags: flags: binary (0x2)
22 28732002 [main] lisp 196 mount_info::conv_to_win32_path: src_path
/proc/196/fd/1, dst /proc/196/fd/1, flags 0x2, rc 0
24 28732026 [main] lisp 196 build_fh_pc: fh 0x612883D0, dev 0xFE
24 28732050 [main] lisp 196 fhandler_process::exists: exists (/proc/196/fd/1)
36 28732086 [main] lisp 196 build_fh_pc: fh 0x612883D0, dev 0xFE
23 28732109 [main] lisp 196 stat_worker: (/proc/196/fd/1, 0xDC3B30,
0x612883D0), file_attributes 128
23 28732132 [main] lisp 196 fhandler_process::exists: exists (/proc/196/fd/1)
25 28732157 [main] lisp 196 time: 1343284878 = time(0)
23 28732180 [main] lisp 196 stat_worker: 0 = (/proc/196/fd/1,0xDC3B30)
23 28732203 [main] lisp 196 normalize_posix_path: src /proc/196/fd/1
23 28732226 [main] lisp 196 normalize_posix_path: /proc/196/fd/1 =
normalize_posix_path (/proc/196/fd/1)
21 28732247 [main] lisp 196 mount_info::conv_to_win32_path:
conv_to_win32_path (/proc/196/fd/1)
22 28732269 [main] lisp 196 fhandler_proc::get_proc_fhandler:
get_proc_fhandler(/proc/196/fd/1)
21 28732290 [main] lisp 196 set_flags: flags: binary (0x2)
21 28732311 [main] lisp 196 mount_info::conv_to_win32_path: src_path
/proc/196/fd/1, dst /proc/196/fd/1, flags 0x2, rc 0
26 28732337 [main] lisp 196 build_fh_pc: fh 0x612883D0, dev 0xFE
22 28732359 [main] lisp 196 fhandler_process::exists: exists (/proc/196/fd/1)
29 28732388 [main] lisp 196 normalize_posix_path: src /proc/196/fd/.
22 28732410 [main] lisp 196 normalize_posix_path: /proc/196/fd/ =
normalize_posix_path (/proc/196/fd/.)
21 28732431 [main] lisp 196 mount_info::conv_to_win32_path:
conv_to_win32_path (/proc/196/fd)
21 28732452 [main] lisp 196 fhandler_proc::get_proc_fhandler:
get_proc_fhandler(/proc/196/fd)
22 28732474 [main] lisp 196 set_flags: flags: binary (0x2)
22 28732496 [main] lisp 196 mount_info::conv_to_win32_path: src_path
/proc/196/fd, dst /proc/196/fd, flags 0x2, rc 0
25 28732521 [main] lisp 196 build_fh_pc: fh 0x612883D0, dev 0xFE
24761 28757282 [main] lisp 196 fhandler_process::exists: exists (/proc/196/fd)
98 28757380 [main] lisp 196 stat64: entering
45 28757425 [main] lisp 196 normalize_posix_path: src /proc/196/fd/
26 28757451 [main] lisp 196 normalize_posix_path: /proc/196/fd/ =
normalize_posix_path (/proc/196/fd/)
25 28757476 [main] lisp 196 mount_info::conv_to_win32_path:
conv_to_win32_path (/proc/196/fd)
25 28757501 [main] lisp 196 fhandler_proc::get_proc_fhandler:
get_proc_fhandler(/proc/196/fd)
61 28757562 [main] lisp 196 set_flags: flags: binary (0x2)
24 28757586 [main] lisp 196 mount_info::conv_to_win32_path: src_path
/proc/196/fd, dst /proc/196/fd, flags 0x2, rc 0
35 28757621 [main] lisp 196 build_fh_pc: fh 0x612883D0, dev 0xFE
60 28757681 [main] lisp 196 fhandler_process::exists: exists (/proc/196/fd)
29 28757710 [main] lisp 196 build_fh_pc: fh 0x612883D0, dev 0xFE
26 28757736 [main] lisp 196 stat_worker: (/proc/196/fd, 0xDC39E0,
0x612883D0), file_attributes 16
106 28757842 [main] lisp 196 fhandler_process::exists: exists (/proc/196/fd)
27 28757869 [main] lisp 196 time: 1343284878 = time(0)
26 28757895 [main] lisp 196 stat_worker: 0 = (/proc/196/fd,0xDC39E0)
28 28757923 [main] lisp 196 stat64: entering
43 28757966 [main] lisp 196 normalize_posix_path: src /proc/196/fd/
23 28757989 [main] lisp 196 normalize_posix_path: /proc/196/fd/ =
normalize_posix_path (/proc/196/fd/)
23 28758012 [main] lisp 196 mount_info::conv_to_win32_path:
conv_to_win32_path (/proc/196/fd)
72 28758084 [main] lisp 196 fhandler_proc::get_proc_fhandler:
get_proc_fhandler(/proc/196/fd)
24 28758108 [main] lisp 196 set_flags: flags: binary (0x2)
22 28758130 [main] lisp 196 mount_info::conv_to_win32_path: src_path
/proc/196/fd, dst /proc/196/fd, flags 0x2, rc 0
91 28758221 [main] lisp 196 build_fh_pc: fh 0x612883D0, dev 0xFE
34 28758255 [main] lisp 196 fhandler_process::exists: exists (/proc/196/fd)
27 28758282 [main] lisp 196 build_fh_pc: fh 0x612883D0, dev 0xFE
54 28758336 [main] lisp 196 stat_worker: (/proc/196/fd, 0xDC3A50,
0x612883D0), file_attributes 16
25 28758361 [main] lisp 196 fhandler_process::exists: exists (/proc/196/fd)
23 28758384 [main] lisp 196 time: 1343284878 = time(0)
72 28758456 [main] lisp 196 stat_worker: 0 = (/proc/196/fd,0xDC3A50)
26 28758482 [main] lisp 196 open: open(/proc/196/fd/, 0x10601)
26 28758508 [main] lisp 196 normalize_posix_path: src /proc/196/fd/
22 28758530 [main] lisp 196 normalize_posix_path: /proc/196/fd/ =
normalize_posix_path (/proc/196/fd/)
80 28758610 [main] lisp 196 mount_info::conv_to_win32_path:
conv_to_win32_path (/proc/196/fd)
25 28758635 [main] lisp 196 fhandler_proc::get_proc_fhandler:
get_proc_fhandler(/proc/196/fd)
101 28758736 [main] lisp 196 set_flags: flags: binary (0x2)
23 28758759 [main] lisp 196 mount_info::conv_to_win32_path: src_path
/proc/196/fd, dst /proc/196/fd, flags 0x2, rc 0
27 28758786 [main] lisp 196 build_fh_pc: fh 0x612883D0, dev 0xFE
83 28758869 [main] lisp 196 fhandler_process::exists: exists (/proc/196/fd)
27 28758896 [main] lisp 196 build_fh_pc: fh 0x612883D0, dev 0xFE
25 28758921 [main] lisp 196 fhandler_base::set_flags: flags 0x18601,
supplied_bin 0x0
77 28758998 [main] lisp 196 fhandler_base::set_flags: O_TEXT/O_BINARY set in
flags 0x10000
28 28759026 [main] lisp 196 fhandler_base::set_flags: filemode set to binary
25 28759051 [main] lisp 196 fhandler_base::set_flags: flags 0x118601,
supplied_bin 0x0
80 28759131 [main] lisp 196 fhandler_base::set_flags: O_TEXT/O_BINARY set in
flags 0x10000
24 28759155 [main] lisp 196 fhandler_base::set_flags: filemode set to binary
36 28759191 [main] lisp 196 fhandler_process::open: 1 =
fhandler_proc::open(0x118601, 420)
88 28759279 [main] lisp 196 open: 4 = open(/proc/196/fd/, 0x18601)
27 28759306 [main] lisp 196 fhandler_process::exists: exists (/proc/196/fd)
23 28759329 [main] lisp 196 time: 1343284878 = time(0)
25 28759354 [main] lisp 196 fstat64: 0 = fstat(4, 0xDC39F8)
550 28759904 [main] lisp 196 write: write(4, 0xDC2480, 1)
38 28759942 [main] lisp 196 __set_errno: virtual ssize_t
fhandler_virtual::write(const void*, size_t):211 setting errno 13
29 28759971 [main] lisp 196 write: -1 = write(4, 0xDC2480, 1), errno 13
Any clues from this why this should or shouldn't work? If I replace /dev/stdout
with /dev/tty it works, but that is not an option for the real use-case (where
stdout is captured from another process). Trying to write to /proc/self/fd/1
hangs up the maxima process (I can break with ^C).
Regards,
Achim.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
- Raw text -