On Thu, May 03, 2018 at 12:27:05AM +0300, [email protected] wrote:
> > 
> > So if i understand, in that case 37 is the fd for places.sqlite-wal
> > opened earlier in the ktrace ?
> > 
> 
> Hi Landry,
> 
> Yes, wiped that temp file, but generated a fresh one, different fd num:
> 
>  50653 firefox  CALL  clock_gettime(CLOCK_MONOTONIC,0x7f7ffffe1d58)
>  50653 firefox  STRU  struct timespec { 44122.094371935 }
>  50653 firefox  RET   clock_gettime 0
>  50653 firefox  CALL  getpid()
>  50653 firefox  RET   getpid 50653/0xc5dd
>  50653 firefox  CALL  stat(0x7f7ffffe1b30,0x7f7ffffe18a0)
>  50653 firefox  NAMI  "/home/user/.mozilla/firefox/test/places.sqlite"
>  50653 firefox  STRU  struct stat { ... }  
>  50653 firefox  RET   stat 0
>  50653 firefox  CALL  
> open(0xb1f8870275d,0x10202<O_RDWR|O_CREAT|O_CLOEXEC>,0644<S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH>)
>  50653 firefox  NAMI  "/home/user/.mozilla/firefox/test/places.sqlite-wal"
>  50653 firefox  RET   open 40/0x28
>  50653 firefox  CALL  fstat(40,0x7f7ffffe1780)
>  50653 firefox  STRU  struct stat { ... }
>  50653 firefox  RET   fstat 0
>  50653 firefox  CALL  fchmod(40,0644<S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH>)
>  50653 firefox  PLDG  fchmod, "fattr", errno 1 Operation not permitted
>  50653 firefox  PSIG  SIGABRT SIG_DFL
>  50653 firefox  NAMI  "firefox.core"
>  50653 firefox  STRU  struct pollfd [2] { fd=16, events=0x3<POLLIN|POLLPRI>, 
> revents=0<> } { fd=37, events=0x3<POLLIN|POLLPRI>, revents=0<> }
>  50653 firefox  STRU  struct pollfd { fd=4, events=0x1<POLLIN>, revents=0<> }
> 
> Collapsed the stats output, let me know if the details are significant.
> Please advise if you'd need further traces and how to obtain more info.
> 

I think I already seen this behaviour in fossil:
- openbsd ports@ list: https://marc.info/?l=openbsd-ports&m=152196264519554&w=2
- fossil-scm list: 
https://www.mail-archive.com/[email protected]/msg27158.html

The fchmod(2) code behave to libsqlite.

In the fossil case (but I assume similarity here), libsqlite sets the
mode on "foo-journal" to be the same than "foo". This code path could be
triggered when the initial run that create "foo" had difference umask
setting than the current run that create "foo-journal".

Anton, what are the mode of (it was part of stripped stat information :-])
- /home/user/.mozilla/firefox/test/places.sqlite
- /home/user/.mozilla/firefox/test/places.sqlite-wal (once created)

and what is your umask value in this shell ?

thanks.
-- 
Sebastien Marie

Reply via email to