Re: dhcpleased and ifstated

2022-07-14 Thread Christer Solskogen
tor. 14. jul. 2022, 15:50 skrev Theo de Raadt :

> Christer Solskogen  wrote:
>
> > On Thu, Jul 14, 2022 at 1:23 AM Theo de Raadt 
> wrote:
> >
> > > Is this specific to a particular network driver?
> > >
> > >
> > Probably not, but I can't be sure as I haven't tried all of them but it
> > happens on both re (APU1) and em(APU2).
>
> Since you have the situation happening, can I ask you to do two tests.
> Use ktrace against dhclient (without the recent execve change), and also
> against dhcpleased.  then use kdump with the -R and -T options, and look
> at the timestamps to study dhcpleased's timing behaviour for querying.
> If there are lessons found in the timing of dhclient, maybe dhcpleased
> can become more forgiving.
>

Will do, but it will probably take a week due to I'm on vacation.

>


Re: Browser access to file system on new install OpenBSD missing.

2022-07-14 Thread Brian Durant

On 7/14/22 12:09 PM, Zé Loff wrote:

On Thu, Jul 14, 2022 at 09:44:20AM +0200, Brian Durant wrote:

The browser issue has returned. An open dialog window to upload a file or to
open a file cannot find the downloads directory and it is impossible to
access by using "recents" or "computer" in the open dialog window. Not sure
what is going on, but it sure is irritating.


Add /tmp and/or other unveil'ed folders to your GTK3 bookmarks.  That
way there is always an accessible folder on the sidebar on which to
click:

 echo "file:///tmp" >> ~/.config/gtk-3.0/bookmarks
Many thanks for the tip. Interestingly, thanks to you I started digging 
around in the two systems to compare differences between them. I found 
what appears to at present be a solution. The system with the browser 
file dialog issues did not have a ~/.config/user-dirs.dirs file for some 
reason. This appears to have solved the problem for now, but I will keep 
your suggestion on the back burner should I need that as an alternative...




Re: dhcpleased and ifstated

2022-07-14 Thread Theo de Raadt
Christer Solskogen  wrote:

> On Thu, Jul 14, 2022 at 1:23 AM Theo de Raadt  wrote:
> 
> > Is this specific to a particular network driver?
> >
> >
> Probably not, but I can't be sure as I haven't tried all of them but it
> happens on both re (APU1) and em(APU2).

Since you have the situation happening, can I ask you to do two tests.
Use ktrace against dhclient (without the recent execve change), and also
against dhcpleased.  then use kdump with the -R and -T options, and look
at the timestamps to study dhcpleased's timing behaviour for querying.
If there are lessons found in the timing of dhclient, maybe dhcpleased
can become more forgiving.



Re: dhcpleased and ifstated

2022-07-14 Thread Christer Solskogen
On Thu, Jul 14, 2022 at 1:23 AM Theo de Raadt  wrote:

> Is this specific to a particular network driver?
>
>
Probably not, but I can't be sure as I haven't tried all of them but it
happens on both re (APU1) and em(APU2).

-- 
chs


Re: Browser access to file system on new install OpenBSD missing.

2022-07-14 Thread Zé Loff
On Thu, Jul 14, 2022 at 09:44:20AM +0200, Brian Durant wrote:
> The browser issue has returned. An open dialog window to upload a file or to
> open a file cannot find the downloads directory and it is impossible to
> access by using "recents" or "computer" in the open dialog window. Not sure
> what is going on, but it sure is irritating.
> 

Add /tmp and/or other unveil'ed folders to your GTK3 bookmarks.  That
way there is always an accessible folder on the sidebar on which to
click:

echo "file:///tmp" >> ~/.config/gtk-3.0/bookmarks

-- 
 



Re: Installing sets from /

2022-07-14 Thread Vincent Legoll
Hello,

On Wed, Jul 13, 2022 at 11:17 PM Nick Holland
 wrote:
> > I expected the setup to look at the / (from the ramdisk), but it
> > searched in /mnt2 instead.
>
> As a user, I'd expect the response there to be "As would be seen
> on the running system."

For an upgrade that would be a good assumption, but for an install,
the running system is the installer, the target filesystem is not even
existing yet.

> As a user, I expect it to go something like this:
> I put the install sets someplace on the running systemm, say
> /home/upgrade or /usr/rel.  I rebooted into bsd.rd, chose
> "install" or "upgrade", I expect to answer exactly where I put
> the files. How the upgrader or installer does the upgrade or
> install, I really don't care."
>
> The installer happens to mount the system hanging off /mnt2,
> but I shouldn't have to know that.  I definitely shouldn't have to
> include that in my answer (in my opinion)

Yeah, I'm not arguing about that.

I came to ask about this after reading the installer code, where
comments are telling:

* Accept a valid /mnt2 or /mnt relative path.
* Accept a valid absolute path.

Which (at least as I interpreted it) implies that you would give
"home/upgrade" or "./usr/rel" for your use cases. But the second
comment, and the way it is implemented, made me think the
absolute pathes should work for ramdisk content.

And the way the installer checks it makes '/' not search where
the comment tells it should.

So the modifications may just be to fix the comment and not
change behavior.

> > Is this in need for a modification, or is it good as-is ?
> > I can submit a patch if you think it is useful.
>
> Speaking only for myself, I think it is working exactly as I'd
> hope right now.
>
> I would spend some time thinking about why you are stuffing the
> install files into the ramdisk rather than from an existing
> file system or other more supported option.  I think the "proper"
> answers will work better for you all around.

I am stuffing a siteXX.tgz in the ramdisk of bsd.rd, alongside the
auto_install.conf file to do an automatic install on a VM.

I want to avoid manual interactions with the VM, so the use of
auto_install.conf, and the install.site script contained in the
siteXX.tgz is for further customizations.

-- 
Vincent Legoll



Web MIDI, Firefox, OpenBSD.

2022-07-14 Thread Brian Durant
On a possibly related issue to my browser access to file system problem, 
has anyone been able to get Web MIDI working with Firefox on OpenBSD 
7.1? Here I am referring to bandcamp.com and flowkey.com in particular. 
Neither site appears to be receiving any MIDI signal despite an Akai 
LPK25 (for testing) being registered by the system at umidi0. Flowkey 
requires ffmpeg to be installed, as well as prompting for the Jazz MIDI 
extension to be installed. Flowkey tabs crash and never make a MIDI 
connection. This has never happened to me with Win 11, Linux, of 
FreeBSD. The Bandcamp site simply doesn't register a MIDI device 
connected to the system, but doesn't crash the tab. Again, any 
constructive advice is welcomed.




Re: Browser access to file system on new install OpenBSD missing.

2022-07-14 Thread Brian Durant
The browser issue has returned. An open dialog window to upload a file 
or to open a file cannot find the downloads directory and it is 
impossible to access by using "recents" or "computer" in the open dialog 
window. Not sure what is going on, but it sure is irritating.




Re: dhcpleased and ifstated

2022-07-14 Thread Florian Obser
On 2022-07-13 17:23 -06, "Theo de Raadt"  wrote:
> Christer Solskogen  wrote:
>
>> This happens every time with dhcpleased and my ISP and it didn't with
>> dhclient, and what I do see now, that I didn't see with dhclient,
>> is that during the negotiation ifconfig says that the interface has
>> "status: no carrier" for 2-3 seconds. Which explains why I don't get a
>> DHCPACK within 1 second.
>
> Is this specific to a particular network driver?
>
> I am suggesting some drivers may have shitty / sloppy coming-up behaviour.
> Or, that dhcpleased is going to need to be more forgiving.  Or maybe
> as a

both dhcpleased and dhclient start working when LINK_STATE_IS_UP is true
(defined in net/if.h). I actually got this wrong at first and then
checked what dhclient is doing. So if it takes 2-3 seconds for the link
to come up it will take 2-3 seconds to get a lease, nothing we can do
about that.

> result of the timeout policy it practices, it works different than dhclient
> did, and maybe that is not surprising?
>

Now, if the driver reports the link is up but it doesn't pass any traffic we
hit a different timeout behaviour. IIRC dhclient sends the first 10
packets with a timeout of 1 second.
I considered that a bit anti-social on wifi where we have seen dhcp
servers taking a few seconds to respond. There is no need to blast the
network. dhcpleased does an exponetial backoff, i.e. timeout of 1, 2, 4,
8... seconds.

-- 
I'm not entirely sure you are real.