Re: syslogd truncating messages on FreeBSD >11.2-R

2019-11-12 Thread Kubilay Kocak

On 9/11/2019 2:08 pm, Scott wrote:

Hi,

please let me know if there is a better forum for this.

As of 11.3-RELEASE syslogd truncates all forwarded messages to 480 bytes for
IPV4 and 1180 for IPv6.

The change occurs in the added code:

 switch (f->f_type) {
 case F_FORW:
 /* Truncate messages to RFC 5426 recommended size. */
 dprintf(" %s", f->fu_forw_hname);
 switch (f->fu_forw_addr->ai_addr->sa_family) {
#ifdef INET
 case AF_INET:
 dprintf(":%d\n",
 
ntohs(satosin(f->fu_forw_addr->ai_addr)->sin_port));
 iovlist_truncate(il, 480);
 break;
#endif

There's more code for IPv6 and the function iovlist_truncate itself.

This change is not turned on by a switch and happens automatically, however I
can't find it documented in UPDATING or the release notes.  I would have
thought that any change in default behaviour of the system should at least be
documented.

Ideally this change would have been implemented via a switch given that the
RFC mentioned in the code (RFC 5426) does not mandate truncation, but
recommends it when the network MTU is not known.

What's the best way to reach out to the maintainer to suggest a switch to
turn on this code?

Thanks,
Scott



Hi Scott,

Looks like this came in in base r332510 [1] via:

https://reviews.freebsd.org/D15011

The commit log message and review history may provide additional context 
for the behaviour change (I haven't reviewed them)


I have CC'd the committer on this email, but in the meantime, and if you 
wouldn't mind, it is worth reporting the issue via Bugzilla, so that we 
track it, and so others can find it.


[1] https://svnweb.freebsd.org/changeset/base/332510

--
Regards,

koobs



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


Re: python dameon coredumps when started from boot, but not by hand

2019-11-12 Thread Pete French




On 10/Nov/2019 22:20, Kevin P. Neal wrote:

The rc script must have a function that starts the python program, right?


Actually, no. It just looks like this:


#!/bin/sh

# PROVIDE: waagent
# REQUIRE: sshd netif dhclient
# KEYWORD: nojail

. /etc/rc.subr

PATH=$PATH:/usr/local/bin:/usr/local/sbin
name="waagent"
rcvar="waagent_enable"
pidfile="/var/run/waagent.pid"
command="/usr/local/sbin/${name}"
command_interpreter="python"
command_args="start"

load_rc_config $name
run_rc_command "$1"

Which is why I have been jumping through some annoying hoops to try and 
get this to work :-) Must admit I havent had the time to devote to it 
properly yet, as I thought it would be relatively simple to do, but the 
simple ways I tried didn't work.


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


Re: linker.hints not being update for ARMs

2019-11-12 Thread Daniel Braniss


> On 12 Nov 2019, at 18:41, Ian Lepore  wrote:
> 
> On Tue, 2019-11-12 at 12:03 +0200, Daniel Braniss wrote:
>>> On 12 Nov 2019, at 11:32, Peter Jeremy  wrote:
>>> 
>>> On 2019-Nov-12 10:30:21 +0200, Daniel Braniss 
>>> wrote:
warning: KLD '/boot/kernel/wlan.ko' is newer than the
 linker.hints file
warning: KLD '/boot/kernel/rtwn.ko' is newer than the
 linker.hints file
>>> 
>>> ...
 the link.hints is indeed very old :
 neo-000# ls -ls /boot/kernel/linker.hints 
 224 -rw-r--r--  1 root  wheel  228972 Jan  1  2010
 /boot/kernel/linker.hints
>>> 
>>> Well, that's a nonsense timestamp because FreeBSD didn't support
>>> AllWinner
>>> in 2010.  My guess is that your system clock was wrong.
>>> 
 how can this be fixed?
>>> 
>>> Try rerunning kldxref (with the clock set correctly).
>> 
>> the file is created before the date gets updated!
>> it seems that on allwinner epoch is 1st of Jan 2010! (after a power
>> cycle)
>> so ‘kldxref’ runs but the time stamp is wrong,
>> probably touch /boot/kernel/linker.hints after the clock is corrected
>> solves the problem
>> 
>> thanks,
>>  danny
>> 
> 
> There doesn't appear to be anything date-sensitive about creating the
> xref files.  If there is no file in a given directory that contains
> modules, the file is created.  It's also created if you've set
> kldxref_clobber=YES in rc.conf (it will rebuild on every boot). 
> Otherwise if an xref file exists, no work is done.
> 
> Since a normal installkernel renames the old directory then populates a
> clean new directory, there's no need for dates to be involved…

I’m cross building and in the arm case no file is created (I did the same for
amd64 an one was created)
> the
> first boot after installing a new kernel should see no xref file and
> build one.  If you do something like hand-install just the kernel or
> just an updated module, then the file won't get rebuilt.
> 
> I've always wished that "service kldxref restart" would just force-
> rebuild the files.
I have kldxref_enable=yes
so it got rebuild the first time after a power cycle it got created with an old 
date,
a reboot did not help since i didn’t know about the clobber stuff.
> 
> Even better, if we could make kldxref usable as a cross-tool, the xrefs
> could be generated during a crossbuild rather than on firstboot.
I thought this was too tricky, in any case it is rather fast to re-create it,
so i guess the clobber stuff should work, In any case the modules
where loaded, so the complain was just that, a warning.

danny

> 
> -- Ian
> 
> 

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


Re: linker.hints not being update for ARMs

2019-11-12 Thread Daniel Braniss


> On 12 Nov 2019, at 11:32, Peter Jeremy  wrote:
> 
> On 2019-Nov-12 10:30:21 +0200, Daniel Braniss  wrote:
>>  warning: KLD '/boot/kernel/wlan.ko' is newer than the linker.hints file
>>  warning: KLD '/boot/kernel/rtwn.ko' is newer than the linker.hints file
> ...
>> the link.hints is indeed very old :
>> neo-000# ls -ls /boot/kernel/linker.hints 
>> 224 -rw-r--r--  1 root  wheel  228972 Jan  1  2010 /boot/kernel/linker.hints
> 
> Well, that's a nonsense timestamp because FreeBSD didn't support AllWinner
> in 2010.  My guess is that your system clock was wrong.
> 
>> how can this be fixed?
> 
> Try rerunning kldxref (with the clock set correctly).

the file is created before the date gets updated!
it seems that on allwinner epoch is 1st of Jan 2010! (after a power cycle)
so ‘kldxref’ runs but the time stamp is wrong,
probably touch /boot/kernel/linker.hints after the clock is corrected solves 
the problem

thanks,
danny

> 
> -- 
> Peter Jeremy

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


Re: linker.hints not being update for ARMs

2019-11-12 Thread Peter Jeremy
On 2019-Nov-12 10:30:21 +0200, Daniel Braniss  wrote:
>   warning: KLD '/boot/kernel/wlan.ko' is newer than the linker.hints file
>   warning: KLD '/boot/kernel/rtwn.ko' is newer than the linker.hints file
...
>the link.hints is indeed very old :
>neo-000# ls -ls /boot/kernel/linker.hints 
>224 -rw-r--r--  1 root  wheel  228972 Jan  1  2010 /boot/kernel/linker.hints

Well, that's a nonsense timestamp because FreeBSD didn't support AllWinner
in 2010.  My guess is that your system clock was wrong.

>how can this be fixed?

Try rerunning kldxref (with the clock set correctly).

-- 
Peter Jeremy


signature.asc
Description: PGP signature


Re: linker.hints not being update for ARMs

2019-11-12 Thread Daniel Braniss


> On 12 Nov 2019, at 10:30, Daniel Braniss  wrote:
> 
> hi,
> well, at least for allwinner, even running /etc/rc.d/kldxref has no effect,
> I noticed this when trying out a wifi dongle, 
> ...
>   Starting devd.
>   Autoloading module: if_rtwn_usb.ko
>   warning: KLD '/boot/kernel/wlan.ko' is newer than the linker.hints file
>   warning: KLD '/boot/kernel/rtwn.ko' is newer than the linker.hints file
> …
> 
> the link.hints is indeed very old :
> neo-000# ls -ls /boot/kernel/linker.hints 
> 224 -rw-r--r--  1 root  wheel  228972 Jan  1  2010 /boot/kernel/linker.hints
> 
> and strangely, other modules loaded did not complain.
> 
> how can this be fixed?

by removing the old file :-)

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

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


linker.hints not being update for ARMs

2019-11-12 Thread Daniel Braniss
hi,
well, at least for allwinner, even running /etc/rc.d/kldxref has no effect,
I noticed this when trying out a wifi dongle, 
...
Starting devd.
Autoloading module: if_rtwn_usb.ko
warning: KLD '/boot/kernel/wlan.ko' is newer than the linker.hints file
warning: KLD '/boot/kernel/rtwn.ko' is newer than the linker.hints file
…

the link.hints is indeed very old :
neo-000# ls -ls /boot/kernel/linker.hints 
224 -rw-r--r--  1 root  wheel  228972 Jan  1  2010 /boot/kernel/linker.hints

and strangely, other modules loaded did not complain.

how can this be fixed?

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