Re: powerd

2017-07-02 Thread Edgar Pettijohn



On 07/02/17 03:40, Robert Elz wrote:

 Date:Sat, 1 Jul 2017 22:17:12 -0500
 From:Edgar Pettijohn 
 Message-ID:  <8fde5619-8942-3a5b-2be5-ac8772811...@pettijohn-web.com>

   | so I'm not really sure which list to send what to yet.

This list is fine for this kind of question.

   | I was reading the powerd manual and it says:

   | Shouldn't that be asynchronously? Or is my definitions backwards?

It depends upon what you are reading the synchronisation to be
relative to .. if you're connecting the power event and the script
you might be right.

But that's not what it is trying to say, it is using terminology as it
is typically used with the shell (since powerd scripts are shell scripts).

There, the synchronisation is with other commands being run, an asynchronous
command is one run "in the background" - that is one that runs in parallel
with other commands also being run, with no co-ordination (or synchrpnisation)
between them.

In shell terminology, if you do

command &

you're running an asynchronous command, and the shell does not wait for
the command to finish before starting on the next.

That's what the powerd manual page is trying to say is not happening, so
it wants to use the opposite of asynchronous, which would be synchronous.

If you'd like to suggest better wording, please do (the best way for that
is to send in a bug report, with send-pr - or using
http://www.netbsd.org/cgi-bin/sendpr.cgi?gndb=netbsd

kre
I went back and read the code and then re-read the manual.  I concur 
with your analysis.  I think it just confused me initially.


Thanks,

Edgar


Re: Upgrade from 7.0.2 to 8.0_BETA: some trouble with sockets (I think)

2017-07-02 Thread Manuel Bouyer
On Sun, Jul 02, 2017 at 03:55:39PM +0200, BERTRAND Joël wrote:
> > Can you ktrace the mysql daemon while doint this ?
> > Eventually match the tcpdump timestamps with the kdump one, to see
> > exaclty
> > what cause the socket to be closed, and what is happening before.
> 
> I have ktrace'd mysqld process before posting here (only when I try to open
> a new connection from client). I paste an extraction of this file :

Are you sure you got all the related informations ?
this is where mayching timestamps from tcpdump with timestamps from
kdump -T would help

> 
>  14288 13 mysqld   RET   __gettimeofday50 0
>  14288 13 mysqld   CALL
> ___lwp_park60(0,1,0x79f65fdffed0,0,0x79f663df2198,0x79f663df2198)
>  14288 14 mysqld   RET   ___lwp_park60 -1 errno 60 Connection timed out

Someone familiar with our pthread implementation will have to tell
if ___lwp_park60 returning this is OK or not

-- 
Manuel Bouyer 
 NetBSD: 26 ans d'experience feront toujours la difference
--


Re: Upgrade from 7.0.2 to 8.0_BETA: some trouble with sockets (I think)

2017-07-02 Thread BERTRAND Joël

Le 02.07.2017 14:49, Manuel Bouyer a écrit :

On Sun, Jul 02, 2017 at 02:20:54PM +0200, BERTRAND Joël wrote:

[...]
I have tried with or without NPF with the same result. With tcpdump, I 
can

see for example on mysql client :
root@hilbert:~# tcpdump port 3306
tcpdump: verbose output suppressed, use -v or -vv for full protocol 
decode
listening on enp3s0, link-type EN10MB (Ethernet), capture size 262144 
bytes
14:14:51.734354 IP 192.168.10.103.59516 > 192.168.10.128.mysql: Flags 
[S],
seq 3338130626, win 29200, options [mss 1460,sackOK,TS val 25821788 
ecr

0,nop,wscale 7], length 0
14:14:51.734458 IP 192.168.10.128.mysql > 192.168.10.103.59516: Flags 
[S.],
seq 3511699100, ack 3338130627, win 32768, options [mss 
1460,nop,wscale

3,sackOK,TS val 1 ecr 25821788], length 0
14:14:51.734490 IP 192.168.10.103.59516 > 192.168.10.128.mysql: Flags 
[.],

ack 1, win 229, options [nop,nop,TS val 25821788 ecr 1], length 0
14:14:51.734581 IP 192.168.10.128.mysql > 192.168.10.103.59516: Flags 
[R],

seq 3511699101, win 0, length 0


Can you ktrace the mysql daemon while doint this ?
Eventually match the tcpdump timestamps with the kdump one, to see 
exaclty

what cause the socket to be closed, and what is happening before.


I have ktrace'd mysqld process before posting here (only when I try to 
open a new connection from client). I paste an extraction of this file :


 14288 13 mysqld   RET   __gettimeofday50 0
 14288 13 mysqld   CALL  
___lwp_park60(0,1,0x79f65fdffed0,0,0x79f663df2198,0x79f663df2198)
 14288 14 mysqld   RET   ___lwp_park60 -1 errno 60 Connection timed 
out

 14288 14 mysqld   CALL  __gettimeofday50(0x79f65f9feef0,0)
 14288 14 mysqld   RET   __gettimeofday50 0
 14288 14 mysqld   CALL  __gettimeofday50(0x79f65f9fee20,0)
 14288 14 mysqld   RET   __gettimeofday50 0
 14288 14 mysqld   CALL  
___lwp_park60(0,1,0x79f65f9fee90,0,0x79f688d17b98,0x79f688d17b98)

 14288 16 mysqld   RET   __select50 0
 14288 16 mysqld   CALL  __gettimeofday50(0x79f65f1fcf70,0)
 14288 16 mysqld   RET   __gettimeofday50 0
 14288 16 mysqld   CALL  __gettimeofday50(0x79f65f1fcf70,0)
 14288 16 mysqld   RET   __gettimeofday50 0
 14288 16 mysqld   CALL  __gettimeofday50(0x79f65f1fcf60,0)
 14288 16 mysqld   RET   __gettimeofday50 0
 14288 16 mysqld   CALL  __select50(0,0,0,0,0x79f65f1fcf70)
 14288 18 mysqld   RET   __select50 0
 14288 18 mysqld   CALL  __gettimeofday50(0x79f6607f5f10,0)
 14288 18 mysqld   RET   __gettimeofday50 0
 14288 18 mysqld   CALL  __gettimeofday50(0x79f6607f5f10,0)
 14288 18 mysqld   RET   __gettimeofday50 0
 14288 18 mysqld   CALL  __select50(0,0,0,0,0x79f6607f5f10)
 14288 13 mysqld   RET   ___lwp_park60 -1 errno 60 Connection timed 
out

 14288 13 mysqld   CALL  __gettimeofday50(0x79f65fdffe60,0)
 14288 13 mysqld   RET   __gettimeofday50 0
 14288 13 mysqld   CALL  
___lwp_park60(0,1,0x79f65fdffed0,0,0x79f663df2198,0x79f663df2198)
 14288 14 mysqld   RET   ___lwp_park60 -1 errno 60 Connection timed 
out

 14288 14 mysqld   CALL  __gettimeofday50(0x79f65f9feef0,0)
 14288 14 mysqld   RET   __gettimeofday50 0
 14288 14 mysqld   CALL  __gettimeofday50(0x79f65f9fee20,0)
 14288 14 mysqld   RET   __gettimeofday50 0
 14288 14 mysqld   CALL  
___lwp_park60(0,1,0x79f65f9fee90,0,0x79f688d17b98,0x79f688d17b98)


I haven't seen strange syscalls nor error in kdump.


I guess you don't have error messages in mysql logs ?


No error in log, of course.

Best regards,

JKB



Re: Upgrade from 7.0.2 to 8.0_BETA: some trouble with sockets (I think)

2017-07-02 Thread Manuel Bouyer
On Sun, Jul 02, 2017 at 02:20:54PM +0200, BERTRAND Joël wrote:
> [...]
> I have tried with or without NPF with the same result. With tcpdump, I can
> see for example on mysql client :
> root@hilbert:~# tcpdump port 3306
> tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
> listening on enp3s0, link-type EN10MB (Ethernet), capture size 262144 bytes
> 14:14:51.734354 IP 192.168.10.103.59516 > 192.168.10.128.mysql: Flags [S],
> seq 3338130626, win 29200, options [mss 1460,sackOK,TS val 25821788 ecr
> 0,nop,wscale 7], length 0
> 14:14:51.734458 IP 192.168.10.128.mysql > 192.168.10.103.59516: Flags [S.],
> seq 3511699100, ack 3338130627, win 32768, options [mss 1460,nop,wscale
> 3,sackOK,TS val 1 ecr 25821788], length 0
> 14:14:51.734490 IP 192.168.10.103.59516 > 192.168.10.128.mysql: Flags [.],
> ack 1, win 229, options [nop,nop,TS val 25821788 ecr 1], length 0
> 14:14:51.734581 IP 192.168.10.128.mysql > 192.168.10.103.59516: Flags [R],
> seq 3511699101, win 0, length 0

Can you ktrace the mysql daemon while doint this ?
Eventually match the tcpdump timestamps with the kdump one, to see exaclty
what cause the socket to be closed, and what is happening before.

I guess you don't have error messages in mysql logs ?

-- 
Manuel Bouyer 
 NetBSD: 26 ans d'experience feront toujours la difference
--


Upgrade from 7.0.2 to 8.0_BETA: some trouble with sockets (I think)

2017-07-02 Thread BERTRAND Joël

Hello,

I'm upgrading a test server from NetBSD 7.0.2 to 8.0_BETA. I have built 
8.0 from sources for amd64 last friday.


Two daemons (built from pkgsrc) refuse to work as expected:
- squid always returns "document contains no data". I have deleted and 
recreated an empty cache volume without any result. My server doesn't 
send any http packets on its WAN interface;
- mysql that runs fine when I connect to this database server from 
localhost:


legendre# mysql -hlocalhost -uroot -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.35 Source distribution

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights 
reserved.


Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input 
statement.


mysql> ^DBye

When I try to access to database from another client, connection was 
closed by server :

root@hilbert:/etc/zm# mysql -uzmuser -h192.168.10.128 -p
Enter password:
ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial 
communication packet', system error: 104 "Connection reset by peer"


Of course, zmuser exists and is authorized. And before upgrade, zmuser 
was able to connect to database and squid ran fine. Configurations of 
mysql and squid haven't been modified.


I have tried with or without NPF with the same result. With tcpdump, I 
can see for example on mysql client :

root@hilbert:~# tcpdump port 3306
tcpdump: verbose output suppressed, use -v or -vv for full protocol 
decode
listening on enp3s0, link-type EN10MB (Ethernet), capture size 262144 
bytes
14:14:51.734354 IP 192.168.10.103.59516 > 192.168.10.128.mysql: Flags 
[S], seq 3338130626, win 29200, options [mss 1460,sackOK,TS val 25821788 
ecr 0,nop,wscale 7], length 0
14:14:51.734458 IP 192.168.10.128.mysql > 192.168.10.103.59516: Flags 
[S.], seq 3511699100, ack 3338130627, win 32768, options [mss 
1460,nop,wscale 3,sackOK,TS val 1 ecr 25821788], length 0
14:14:51.734490 IP 192.168.10.103.59516 > 192.168.10.128.mysql: Flags 
[.], ack 1, win 229, options [nop,nop,TS val 25821788 ecr 1], length 0
14:14:51.734581 IP 192.168.10.128.mysql > 192.168.10.103.59516: Flags 
[R], seq 3511699101, win 0, length 0


All other daemons seem to run as expected.

I have tried to rebuild mysql and squid from pkgsrc but it doesn't fix 
this issue.


All ideas to solve this issue are welcome.

Best regards,

JKB


Re: wpa_supplicant error on mac

2017-07-02 Thread Gua Chung Lim
* Chavdar Ivanov (ci4...@gmail.com) wrote:
> You have to select "Advanced" and then "Adapter type" - paravirtualized, if
> you want to try vioif0.  [image: VirtualBox_2017-07-01_20-33-55.png]

* Robert Elz (k...@munnari.oz.au) wrote:
> That is the wrong place to look - that list is of where your virtual
> ethernet is connected (and is the one you have to use.)

Yes, thanks.


* Robert Elz (k...@munnari.oz.au) wrote:
> Th one where you get to select what kind of interface virtualbox provides
> to the guest is seen when you turn on the advanced options, and then
> look at the "adaptor type".   But changing this is not going to alter
> anything that matters to you right now, and would only confuse things
> by altering the way you need to configure your NetBSD system (well, it
> changes the NetBSD names of the interfaces, so changes what gets
> configured.)
> 
> Before we go further, if you turn wpa_supplicant (on NetBSD) off,
> (which will certainly make the errors from it go away), what if any
> problem remains for you to solve?   What does not work (if anything)
> after that.
Actually, I currently have no problems at all. The network works pretty fine.
There are not any issues. This thread should be considered as closed.

Thank you very much.

-- 
Gua Chung Lim
 
If you desire knowledges, learn one thing everyday.
If you desire wisdom, leave one thing everyday.
 
-- Lao Tzu


Re: powerd

2017-07-02 Thread Robert Elz
Date:Sat, 1 Jul 2017 22:17:12 -0500
From:Edgar Pettijohn 
Message-ID:  <8fde5619-8942-3a5b-2be5-ac8772811...@pettijohn-web.com>

  | so I'm not really sure which list to send what to yet.

This list is fine for this kind of question.

  | I was reading the powerd manual and it says:

  | Shouldn't that be asynchronously? Or is my definitions backwards?

It depends upon what you are reading the synchronisation to be
relative to .. if you're connecting the power event and the script
you might be right.

But that's not what it is trying to say, it is using terminology as it
is typically used with the shell (since powerd scripts are shell scripts).

There, the synchronisation is with other commands being run, an asynchronous
command is one run "in the background" - that is one that runs in parallel
with other commands also being run, with no co-ordination (or synchrpnisation)
between them.

In shell terminology, if you do

command &

you're running an asynchronous command, and the shell does not wait for
the command to finish before starting on the next.

That's what the powerd manual page is trying to say is not happening, so
it wants to use the opposite of asynchronous, which would be synchronous.

If you'd like to suggest better wording, please do (the best way for that
is to send in a bug report, with send-pr - or using
http://www.netbsd.org/cgi-bin/sendpr.cgi?gndb=netbsd

kre