Bug#831396: procps: [ps] fails on kfreebsd

2016-12-04 Thread lumin
Hi,

> Note that as a quick workaround you can set this on 10.3:
> # sysctl -w compat.linux.osrelease=2.6.16

It worked for me, thanks!

Debian/kfreebsd-amd64 sid with kfreebsd-10.3



Bug#831396: procps: [ps] fails on kfreebsd

2016-07-16 Thread Steven Chamberlain
Hello,

I'm glad you both managed to figure out the cause of this...
sorry for not filing a bug about it already.

Carsten Leonhardt wrote:
> $ more /proc/sys/kernel/osrelease
> 2.6.32

This affects sid (kfreebsd 10.3) but not older kernel versions.

Note that as a quick workaround you can set this on 10.3:
# sysctl -w compat.linux.osrelease=2.6.16

Regards,
-- 
Steven Chamberlain
ste...@pyro.eu.org


signature.asc
Description: Digital signature


Bug#831396: procps: [ps] fails on kfreebsd

2016-07-16 Thread Carsten Leonhardt
> Ah ha, I think I know the problem. And it is related to the kernel version.
> asdfasdf has this:
> $ more /proc/sys/kernel/osrelease
> 2.6.16
> I bet you have something else, something bigger than 2.6.27
>
> The relevant procps code:
> if (linux_version_code < LINUX_VERSION(2, 6, 27))
>   kb_main_available = kb_main_free;
> else {
>   FILE_TO_BUF(VM_MIN_FREE_FILE, vm_min_free_fd);
>
> So, the fix will be to have some #if around that extra check and just use
> the old school make available the same as free.

correct:

$ more /proc/sys/kernel/osrelease
2.6.32



Bug#831396: procps: [ps] fails on kfreebsd

2016-07-16 Thread Craig Small
On Sat, Jul 16, 2016 at 7:20 PM Carsten Leonhardt  wrote:

>   3857 ps   NAMI  "/proc/sys/vm/min_free_kbytes"
>
  3857 ps   RET   open -1 errno 2 No such file or directory
>

Ah ha, I think I know the problem. And it is related to the kernel version.
asdfasdf has this:
$ more /proc/sys/kernel/osrelease
2.6.16
I bet you have something else, something bigger than 2.6.27

The relevant procps code:
if (linux_version_code < LINUX_VERSION(2, 6, 27))
  kb_main_available = kb_main_free;
else {
  FILE_TO_BUF(VM_MIN_FREE_FILE, vm_min_free_fd);

So, the fix will be to have some #if around that extra check and just use
the old school make available the same as free.

 - Craig


Bug#831396: procps: [ps] fails on kfreebsd

2016-07-16 Thread Carsten Leonhardt
Hi,

> Could it be they have "improved" the procfs in some way from 9.x to 10.x?
> Can you strace the ps command? I'm looking for opens under /proc that fail.

this is the end of a ktrace:

  3857 ps   CALL  open(0x80146de1b,0,0)
  3857 ps   NAMI  "/proc/sys/vm/min_free_kbytes"
  3857 ps   RET   open -1 errno 2 No such file or directory
  3857 ps   CALL  write(0x2,0x80146e350,0xb0)
  3857 ps   GIO   fd 2 wrote 176 bytes
   "Error: /proc must be mounted
  To mount /proc at boot you need an /etc/fstab line like:
  proc   /proc   procdefaults
  In the meantime, run "mount proc /proc -t proc"
   "
  3857 ps   RET   write 176/0xb0
  3857 ps   CALL  exit(0x66)

That file is referenced in proc/sysinfo.c and used in function
meminfo(). I've re-checked: all commands that use meminfo() fail.

There is no directory /proc/sys/vm in either the FreeBSD-kernel
10.1-0-amd64 (jessie-kfreebsd) nor in 10.3-0-amd64 (sid).

The reference to /proc/sys/vm/min_free_kbytes apparently was introduced
with your commit f65d2815913f5d8ff4156384dceb160edd6da812 titled
"Imported Upstream version 3.3.10".

Carsten



Bug#831396: procps: [ps] fails on kfreebsd

2016-07-15 Thread Craig Small
On Sat, Jul 16, 2016 at 1:21 AM Carsten Leonhardt  wrote:

> # ps
> Error: /proc must be mounted
>
/proc must be mounted basically means "I tried opening a file under /proc
and failed".

I just compiled procps 3.3.12 on the Debian kfreebsd machine asdfasdf and
worked fine.
Unfortunately I am unable to test it locally because the installer is
broken horribly; everything crashes, but I digress.

Kernel: kFreeBSD 10.3-0-amd64
asdfasdf has the following:
uname -a
GNU/kFreeBSD asdfasdf 9.0-2-amd64 #0 Sun May 17 20:12:58 UTC 2015 x86_64
amd64 AMD Sempron(tm) Processor 3000+ GNU/kFreeBSD

Could it be they have "improved" the procfs in some way from 9.x to 10.x?
Can you strace the ps command? I'm looking for opens under /proc that fail.

 - Craig


Bug#831396: procps: [ps] fails on kfreebsd

2016-07-15 Thread Carsten Leonhardt
Package: procps
Version: 2:3.3.12-2
Severity: normal
User: debian-...@lists.debian.org
Usertags: kfreebsd

Dear Maintainer,

ps fails on kfreebsd-amd64:

# ps
Error: /proc must be mounted
  To mount /proc at boot you need an /etc/fstab line like:
  proc   /proc   procdefaults
  In the meantime, run "mount proc /proc -t proc"

But proc is mounted:

# mount | grep proc
linprocfs on /proc (linprocfs, local)

A locally rebuilt 2:3.3.10-4 doesn't work either.

Version 2:3.3.9-9 from jessie-kfreebsd works.

-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: kfreebsd-amd64 (x86_64)

Kernel: kFreeBSD 10.3-0-amd64
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages procps depends on:
ii  init-system-helpers  1.39
ii  libc0.1  2.23-1
ii  libncurses5  6.0+20160625-1
ii  libncursesw5 6.0+20160625-1
ii  libprocps6   2:3.3.12-2
ii  libtinfo56.0+20160625-1
ii  lsb-base 9.20160629

Versions of packages procps recommends:
ii  psmisc  22.21-2.1

procps suggests no packages.

-- no debconf information