PSA: upcoming devfs behavior changes

4 views
Skip to first unread message

Tamir Duberstein

unread,
Oct 6, 2022, 6:49:22 PM10/6/22
to TQ Engineering, drive...@fuchsia.dev
Good news everyone! devfs has been rewritten on top of the in-tree C++ VFS library. This improves compliance with the fuchsia.io FIDL protocols and removes a longstanding chunk of technical debt. This change is expected to merge in the next hour or so.

If you don't interact with /dev/, you can stop reading here.

If you're still reading, you must be feeling dread - but fear not! We've gone to considerable lengths to preserve devfs' behavior bug-for-bug with one known exception: devfs will now reject attempts to open a device which isn't backed by a functioning driver. Prior to this change devfs would silently open the node as a directory, in spite of the presence of OpenFlags.NOT_DIRECTORY.

The only type of interaction found to be affected by this change is `open(path_rooted_at_devfs, O_RDWR)`. The presence of `O_RDWR` implies `NOT_DIRECTORY` in our libc implementation - this is done to match POSIX behavior. This will now result in the connection being closed; if OpenFlags.DESCRIBE was passed, the OnOpen event will contain `ZX_ERR_NOT_FILE` which our libc implementation translates to `EISDIR`. Callers may need to replace `O_RDWR` with `O_RDONLY` or `O_RDWR | O_DIRECTORY`.

Please reach out if you believe you are affected.

Thanks.
tamird

Tamir Duberstein

unread,
Oct 9, 2022, 7:17:06 PM10/9/22
to Tom Robinson, tq-eng, drive...@fuchsia.dev, Libassistant Eng, opal-fuchsia
Thanks Tom! I can confirm that even `fx shell echo hello > /dev/null` produces that same error. I sent https://fuchsia-review.googlesource.com/c/fuchsia/+/737065 which fixes the problem locally.

On Sun, Oct 9, 2022 at 6:42 PM Tom Robinson <robin...@google.com> wrote:
A bunch of rollers (e.g. https://luci-milo.appspot.com/p/turquoise/builders/global.roller/opal-latest-roller?limit=200 and https://ci.chromium.org/p/turquoise/builders/global.roller/libassistant-latest-roller) have begun to exibit an error

```
Sl4f server could not be started: status: {...
Sl4f server could not be started: status: {
code: ERROR
msg: ssh command to start sl4f error: failed to run shell ["run" "-d" "fuchsia-pkg://fuchsia.com/sl4f#meta/sl4f.cmx" ">" "/dev/null" "2>" "/dev/null"]: remote ssh session run failed for command "run -d fuchsia-pkg://fuchsia.com/sl4f#meta/sl4f.cmx > /dev/null 2> /dev/null": Process exited with status 2 , stdout: , stderr: /boot/bin/sh: 1: cannot create /dev/null: Not supported

}
```


Currently wondering if https://fuchsia-review.googlesource.com/c/fuchsia/+/729224 introduced the error, but when I sync to that specific change, `fx serve` also gives me problems (which is maybe related too?).

Thanks

Tom

Tom Robinson

unread,
Oct 9, 2022, 9:30:19 PM10/9/22
to tq-eng, Tamir Duberstein, drive...@fuchsia.dev, Libassistant Eng, opal-fuchsia
A bunch of rollers (e.g. https://luci-milo.appspot.com/p/turquoise/builders/global.roller/opal-latest-roller?limit=200 and https://ci.chromium.org/p/turquoise/builders/global.roller/libassistant-latest-roller) have begun to exibit an error

```
Sl4f server could not be started: status: {...
Sl4f server could not be started: status: {
code: ERROR
msg: ssh command to start sl4f error: failed to run shell ["run" "-d" "fuchsia-pkg://fuchsia.com/sl4f#meta/sl4f.cmx" ">" "/dev/null" "2>" "/dev/null"]: remote ssh session run failed for command "run -d fuchsia-pkg://fuchsia.com/sl4f#meta/sl4f.cmx > /dev/null 2> /dev/null": Process exited with status 2 , stdout: , stderr: /boot/bin/sh: 1: cannot create /dev/null: Not supported

}
```


Currently wondering if https://fuchsia-review.googlesource.com/c/fuchsia/+/729224 introduced the error, but when I sync to that specific change, `fx serve` also gives me problems (which is maybe related too?).

Thanks

Tom

On Thursday, October 6, 2022 at 2:47:37 PM UTC-7 Tamir Duberstein wrote:

Tom Robinson

unread,
Oct 9, 2022, 9:30:25 PM10/9/22
to tq-eng, Tamir Duberstein, tq-eng, drive...@fuchsia.dev, Libassistant Eng, opal-fuchsia, Tom Robinson
Thanks!

Tom Robinson

unread,
Oct 10, 2022, 11:13:34 AM10/10/22
to tq-eng, Tamir Duberstein, drive...@fuchsia.dev, opal-fuchsia, tq-kronk-team
-libassistant 
+tq-kronk-team 


On Sun, Oct 9, 2022 at 11:54 PM Tom Robinson <robin...@google.com> wrote:
Still seeing same error on rollers.

```

at head.

Tom

Tom Robinson

unread,
Oct 10, 2022, 11:13:50 AM10/10/22
to tq-eng, Tom Robinson, Tamir Duberstein, tq-eng, drive...@fuchsia.dev, Libassistant Eng, opal-fuchsia
Still seeing same error on rollers.

```

at head.

Tom

On Sunday, October 9, 2022 at 4:27:18 PM UTC-7 Tom Robinson wrote:
Reply all
Reply to author
Forward
0 new messages