[tlbuild] dvi test?

Bruno Voisin bvoisin at icloud.com
Mon Jan 31 13:45:05 CET 2022


Replying Karl

> Seems like the system has decided not to (re)open the real file, and
> instead to return 0 0 0 0 0 ... as if one had seeked past the end or
> some such. Or an earlier error has made the fd invalid. Or ... ?
> It presumably has to be something in the OS operation.
> 
> [...]
> 
> Maybe running strace on the failing invocation (as minimum as possible
> -- just the R) to see all syscalls would be of some help.

macOS doesn't seem to have strace. I used dtruss instead, based on what I could find online. 

In order to get dtruss to work, you need to disable System Integrity Protection first: on Monterey dtruss crashes with SIP on, and on High Sierra it gives only partial information.

The output is attached. I ran "xdvi t2a.dvi" in one Terminal window, waited for the document to open in XQuartz, ran "sudo dtruss -n xdvi" in another Terminal window, pressed as fast as I could R in the xdvi window then Quit (on High Sierra, when xdvi doesn't crash), and ^C in the dtruss Terminal window.

Also: it's the exact same file t2a.dvi in both cases. I created the file in Monterey, then copied it to the High Sierra setup. It's attached too.

Interpreting the output is way past what I'm capable of. The only thing I noticed is that, on Monterey, there's

 3208/0x31ed:  open_nocancel("/Users/brunovoisin/Desktop/Testing/xdvi/Test-John/t2a.dvi\0", 0x0, 0x0)		 = 4 0
 3208/0x31ed:  fstat64(0x4, 0x102B781C0, 0x0)		 = 0 0
 3208/0x31ed:  ftruncate(0x6, 0x0, 0x0)		 = 0 0
 3208/0x31ed:  lseek(0x6, 0xFFFFFFFFFFFFF7C7, 0x1)		 = -1 Err#22
 3208/0x31ed:  fstat64(0x4, 0x16D3A7120, 0x0)		 = 0 0
 3208/0x31ed:  lseek(0x4, 0x0, 0x1)		 = 0 0
 3208/0x31ed:  lseek(0x4, 0x0, 0x0)		 = 0 0
 3208/0x31ed:  read_nocancel(0x4, "\367\002\001\203\222\300\034;\0", 0x1000)	 = 2192 0
 3208/0x31ed:  read_nocancel(0x4, "able\226\005ffof\223Authorities\216\237\025\347\033\215\363\036\214-\370\024\0", 0x1000)		 = 0 0
 3208/0x31ed:  write_nocancel(0x6, "\367\002\001\203\222\300\034;\0", 0x890)	 = 2192 0
 3208/0x31ed:  lseek(0x4, 0x0, 0x0)		 = 0 0
 3208/0x31ed:  lseek(0x6, 0x0, 0x0)		 = 0 0
 3208/0x31ed:  read_nocancel(0x6, "\0", 0x1000)		 = 4096 0

and from then on things start to go wrong, giving

 3208/0x31ed:  setitimer(0x0, 0x102B78B38, 0x0)		 = 0 0
 3208/0x31ed:  close_nocancel(0x4)		 = 0 0
 3208/0x31ed:  write(0x7, " erasepage stop\n%%xdvimark\n\0", 0x1B)		 = 27 0

whereas on High Sierra it's

  763/0x1bcf:  open_nocancel("/Users/brunovoisin/Desktop/Testing/t2a.dvi\0", 0x0, 0x1B6)		 = 4 0
  763/0x1bcf:  fstat64(0x4, 0x105C14CB8, 0x0)		 = 0 0
  763/0x1bcf:  ftruncate(0x6, 0x0, 0x0)		 = 0 0
  763/0x1bcf:  lseek(0x6, 0x0, 0x0)		 = 0 0
  763/0x1bcf:  fstat64(0x4, 0x7FFEEA121478, 0x0)		 = 0 0
  763/0x1bcf:  lseek(0x4, 0x0, 0x1)		 = 0 0
  763/0x1bcf:  lseek(0x4, 0x0, 0x0)		 = 0 0
  763/0x1bcf:  read_nocancel(0x4, "\367\002\001\203\222\300\034;\0", 0x1000)	 = 2192 0
  763/0x1bcf:  read_nocancel(0x4, "able\226\005ffof\223Authorities\216\237\025\347\033\215\363\036\214-\370\024\0", 0x1000)		 = 0 0
  763/0x1bcf:  write_nocancel(0x6, "\367\002\001\203\222\300\034;\0", 0x890)	 = 2192 0
  763/0x1bcf:  lseek(0x4, 0x0, 0x0)		 = 0 0
  763/0x1bcf:  lseek(0x6, 0x0, 0x0)		 = 0 0
  763/0x1bcf:  read_nocancel(0x6, "\367\002\001\203\222\300\034;\0", 0x1000)	 = 2192 0

leading up to

  763/0x1bcf:  lseek(0x6, 0x0, 0x2)		 = 2192 0
  763/0x1bcf:  lseek(0x6, 0x68C, 0x0)		 = 1676 0
  763/0x1bcf:  read_nocancel(0x6, "roiden\225\270\343t,\221\003\233\263sun\223t\216\241\215\221>\0", 0x1000)		 = 516 0
  763/0x1bcf:  lseek(0x6, 0x885, 0x0)		 = 2181 0
  763/0x1bcf:  read_nocancel(0x6, "\0", 0x1000)		 = 11 0
  763/0x1bcf:  lseek(0x6, 0x80F, 0x0)		 = 2063 0
  763/0x1bcf:  read_nocancel(0x6, "\370\0", 0x1000)		 = 129 0
  763/0x1bcf:  lseek(0x6, 0x3F9, 0x0)		 = 1017 0
  763/0x1bcf:  read_nocancel(0x6, "\213\0", 0x1000)		 = 1175 0
  763/0x1bcf:  lseek(0x6, 0x422, 0x0)		 = 1058 0
  763/0x1bcf:  read_nocancel(0x6, "\0", 0x1000)		 = 1134 0
  763/0x1bcf:  lseek(0x6, 0x39B, 0x0)		 = 923 0
  763/0x1bcf:  read_nocancel(0x6, "\213\0", 0x1000)		 = 1269 0
  763/0x1bcf:  lseek(0x6, 0x3C4, 0x0)		 = 964 0
  763/0x1bcf:  read_nocancel(0x6, "\0", 0x1000)		 = 1228 0
  763/0x1bcf:  lseek(0x6, 0x2A, 0x0)		 = 42 0
  763/0x1bcf:  read_nocancel(0x6, "\213\0", 0x1000)		 = 2150 0
  763/0x1bcf:  lseek(0x6, 0x53, 0x0)		 = 83 0
  763/0x1bcf:  read_nocancel(0x6, "\377\377\377\377\215\357\032header=l3backend-dvips.pro\216\240\002y\0", 0x1000)		 = 2109 0
  763/0x1bcf:  write(0x7, "Hxdvi$doc restore stop\n%%xdvimark\n\0", 0x22)	 = 34 0

Could this be (on Monterey) linked to the earlier

 3208/0x31ed:  lseek(0x6, 0xFFFFFFFFFFFFF7C7, 0x1)		 = -1 Err#22

Bruno

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dtruss-output.zip
Type: application/zip
Size: 16279 bytes
Desc: not available
URL: <https://tug.org/pipermail/tlbuild/attachments/20220131/724711b1/attachment-0001.zip>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t2a.dvi
Type: application/octet-stream
Size: 2192 bytes
Desc: not available
URL: <https://tug.org/pipermail/tlbuild/attachments/20220131/724711b1/attachment-0001.obj>
-------------- next part --------------




More information about the tlbuild mailing list.