Re: strange compile error in scvgarndr.c

2017-04-17 Thread O. Hartmann
On Mon, 17 Apr 2017 10:14:59 +0200
Gary Jennejohn  wrote:

> I'm seeing this very strange error when I try to make a kernel using
> sources updated about 5 minutes ago:
> 
> --
> >>> stage 3.1: building everything  
> --
> /usr/src/sys/dev/syscons/scvgarndr.c:177:31: error: unused variable
> 'mouse10x16' [-Werror,-Wunused-const-variable]
> static const struct mousedata mouse10x16 = { {
>   ^
> 1 error generated.
> *** Error code 1
> 
> Even if I add "mpd = " before the test for font size in
> various places the compiler spits out this error message.
> 
> Maybe my compiler is too old? I'm using
> cc --version
> FreeBSD clang version 4.0.0 (branches/release_40 296509) (based on LLVM 4.0.0)
> Target: x86_64-unknown-freebsd12.0
> Thread model: posix
> InstalledDir: /usr/bin
> 

I see this error, too, on one box.

/usr/src ist at revision 317077.

Host's OS:

FreeBSD 12.0-CURRENT #13 r316677: Mon Apr 10 14:24:06 CEST 2017 amd64

cc --version:

FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (based on LLVM
4.0.0) Target: x86_64-unknown-freebsd12.0
Thread model: posix
InstalledDir: /usr/bin
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: CFT: EVDEV support in psm(4) driver

2017-04-17 Thread Vladimir Kondratyev

On 2017-04-17 13:59, Jan Kokemüller wrote:

Hi Vladimir,
this patch works great for me!

Great!


I am not using xf86-input-mouse or xf86-input-keyboard.

You stepped on minefield. xf86-input-keyboard does things that should
be done by xorg-server like terminal blanking, disabling keybuffering
and so on. I had seen (and heard) some funny effects before copied
required ~20 lines of code from xf86-input-keyboard to xorg-server.


 - TrackPoint scrolling holding the middle button
Thanks for report. I was not able to test trackpoint due to lack of 
hardware.



The only thing that doesn't work out of the box is the mouse pointer
on the VT console. It wouldn't be hard though to write a small tool
that uses libinput to translate Evdev events into CONS_MOUSECTL ioctls
needed for the VT pointer.
Just run moused on /dev/psm0. Unlike usermode drivers like 
xf86-input-synaptics
in psm mode, in-kernel driver keeps psm0 device unbusied in sysmouse 
mode.



Some comments:
 - PS2_MOUSE_SYNAPTICS_PRODUCT should be 0x0007, not 0x0009
(http://lxr.free-electrons.com/source/drivers/input/mouse/psmouse.h#L86)
 - The TrackPoint should be added with product id 0x000A as on Linux
and with the INPUT_PROP_POINTING_STICK Evdev property set
 - I think it would be better if the same Evdev device names were
exposed as on Linux (for example "SynPS/2 Synaptics TouchPad"). Many
scripts using xinput to change device properties depend on the Linux
device names.

I've added a patch and comments to https://reviews.freebsd.org/D10265 .

Patch looks good to me. I will merge it after small refactoring.

Thank you!

--
WBR
Vladimir Kondratyev
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Re: r316958: booting a server takes >10 minutes!

2017-04-17 Thread Ian Lepore
On Sun, 2017-04-16 at 21:53 -0700, Maxim Sobolev wrote:
> Well, all this suggests to me that there must be some issue with the client
> syslog code in the libc, so that if syslog daemon hangs or has some
> internal issue that would basically render system mostly unusable. I think
> that might be an interesting project for somebody who has some spare time
> on hands to take syslogd as of (r317033 - 1) and see what can be done to
> improve resilience of the system against such a failure mode.
> 
> -Max
> 

On the sending side, the libc code tries very hard to deliver messages
to the unpriveleged /var/run/log socket; if the datagram send fails due
to buffer space (i.e., due to syslogd not keeping up on the read side),
it will endlessly loop to sleep for 1us then try again until it
succeeds.

On the other hand, for /var/run/logpriv apparently the theory is that
hanging a process with enough privs to use that connection would be
bad.  So it retries just once for errors that are not related to buffer
space, and doesn't retry at all if the error was buffer space (which is
a case of the code not quite matching the nearby comments) then gives
up on syslogd and writes the message directly to the console before
returning.

So yeah, there may be some room for improvement in that logic. :)  I
think it could eventually give up in the non-priv case and maybe try an
extra time or two in the priveleged case.

When we ran into this at $work years ago we just wrote our own work-
alike function to use instead of syslog(3); it retries any kind of
failure no more than 3 times, with a millisecond sleep between each
try.  (Losing logging is bad, but losing the functionality of our app
that's trying to do the logging is even worse.)

-- Ian

> On Sun, Apr 16, 2017 at 5:50 PM, Ben Woods 
> wrote:
> 
> > 
> > On 16 April 2017 at 03:24, Larry Rosenman  wrote:
> > 
> > > 
> > > Current SVN seems to have fixed it (via sobomax@ syslogd commit).
> > > 
> > 
> > I experienced this issue too, and can confirm that it existing on
> > r316952,
> > but is resolve on r317033.
> > 
> > It was extremely strange. The symptoms I was experiencing were:
> > - lightdm display manager would fail to start
> > - slim display manager would start, but then fail to login to xfce
> > - "service hald restart" and "service dbus restart" would fail
> > - "pkg upgrade hal" would fail
> > 
> > Regards,
> > Ben
> > 
> > --
> > From: Benjamin Woods
> > woods...@gmail.com
> > ___
> > freebsd-current@freebsd.org mailing list
> > https://lists.freebsd.org/mailman/listinfo/freebsd-current
> > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freeb
> > sd.org"
> > 
> > 
> ___
> freebsd-current@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd
> .org"
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Fwd: Sendmail eats CPU on r317039 [after -r316874 it may be -r316951 and -r316973 are not enough to fix everything]

2017-04-17 Thread Mark Millard
Just an FYI of a more recent report of runaway sendmail on a
more recent system version ( -r317039 ):

Begin forwarded message:

> From: Tom Vijlbrief 
> Subject: Sendmail eats CPU on r317039
> Date: April 17, 2017 at 3:39:37 AM PDT
> To: "freebsd-current at freebsd.org" , 
> freebsd-arm 
> 
> On a recent kernel sendmail is constantly consuming CPU.
> 
> truss -p PID
> 
> shows:
> 
> sendto(3,"<22>Apr 17 10:30:33 sendmail[362"...,163,0x0,NULL,0) ERR#55 'No
> buffer space available'
> nanosleep({ 0.01000 }) = 0 (0x0)
> sendto(3,"<22>Apr 17 10:30:33 sendmail[362"...,163,0x0,NULL,0) ERR#55 'No
> buffer space available'
> nanosleep({ 0.01000 })
> ...
> 
> This is on an arm64 system

Analysis of Tom V.'s context for this may be required.

===
Mark Millard
markmi at dsl-only.net

___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: CFT: EVDEV support in psm(4) driver

2017-04-17 Thread Jan Kokemüller

Hi Vladimir,
this patch works great for me!
I'm testing this with a semi-mt Synaptics touchpad and a TrackPoint of a 
Lenovo T420. I'm running 12-CURRENT (amd64) and Xorg 1.19.3 from 
Matthew's CFT with the libudev-devd backend. The Evdev devices are 
picked up correctly by libudev-devd and xf86-input-libinput (even the 
TrackPoint). I haven't tested this with xf86-input-synaptics (which is 
in maintenance mode) or xf86-input-evdev. I am not

using xf86-input-mouse or xf86-input-keyboard.

What works (everything):
 - true smooth scrolling with Xinput2 (tested with GTK3 Firefox or 
gtk3-demo)

 - TrackPoint scrolling holding the middle button
 - both horizontal/vertical scrolling
 - two finger scrolling powered by libinput (this semi-mt touchpad 
doesn't really support more gestures than this)


The only thing that doesn't work out of the box is the mouse pointer on 
the VT console. It wouldn't be hard though to write a small tool that 
uses libinput to translate Evdev events into CONS_MOUSECTL ioctls needed 
for the VT pointer.


Some comments:
 - PS2_MOUSE_SYNAPTICS_PRODUCT should be 0x0007, not 0x0009 
(http://lxr.free-electrons.com/source/drivers/input/mouse/psmouse.h#L86)
 - The TrackPoint should be added with product id 0x000A as on Linux 
and with the INPUT_PROP_POINTING_STICK Evdev property set
 - I think it would be better if the same Evdev device names were 
exposed as on Linux (for example "SynPS/2 Synaptics TouchPad"). Many 
scripts using xinput to change device properties depend on the Linux 
device names.


I've added a patch and comments to https://reviews.freebsd.org/D10265 .

Even Linux 64-bit binaries work correctly with the created 
/dev/input/event* devices after applying those two patches here:

 - https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=218625
 - https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=218627

This will be very useful for Linux games using joysticks, game 
controllers etc.


Cheers,
Jan
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Sendmail eats CPU on r317039

2017-04-17 Thread Tom Vijlbrief
On a recent kernel sendmail is constantly consuming CPU.

truss -p PID

shows:

sendto(3,"<22>Apr 17 10:30:33 sendmail[362"...,163,0x0,NULL,0) ERR#55 'No
buffer space available'
nanosleep({ 0.01000 }) = 0 (0x0)
sendto(3,"<22>Apr 17 10:30:33 sendmail[362"...,163,0x0,NULL,0) ERR#55 'No
buffer space available'
nanosleep({ 0.01000 })
...

This is on an arm64 system
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


strange compile error in scvgarndr.c

2017-04-17 Thread Gary Jennejohn
I'm seeing this very strange error when I try to make a kernel using
sources updated about 5 minutes ago:

--
>>> stage 3.1: building everything
--
/usr/src/sys/dev/syscons/scvgarndr.c:177:31: error: unused variable 'mouse10x16'
  [-Werror,-Wunused-const-variable]
static const struct mousedata mouse10x16 = { {
  ^
1 error generated.
*** Error code 1

Even if I add "mpd = " before the test for font size in
various places the compiler spits out this error message.

Maybe my compiler is too old? I'm using
cc --version
FreeBSD clang version 4.0.0 (branches/release_40 296509) (based on LLVM 4.0.0)
Target: x86_64-unknown-freebsd12.0
Thread model: posix
InstalledDir: /usr/bin

-- 
Gary Jennejohn
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"