Re: seldom crashes on Dell E6330 with 12-CURRENT

2016-07-26 Thread Matthias Apitz

I have moved swap to its own partition using this commands:


... it turned out, that having swap as a plane file in /usr was
not a good decission, we deleted (after making DUMPS) the 'ssdusrfs'
again, created swap and re-created 'ssdusrfs'; this must be done while
/dev/gpt/ssdusrfs is not mounted!

# gpart show -l ada0
=>   40  488397088  ada0  GPT  (233G)
 40   1024 1  ssdboot  (512K)
   1064984- free -  (492K)
   20484194304 2  ssdrootfs  (2.0G)
41963524194304 3  ssdvarfs  (2.0G)
8390656  480006144 4  ssdusrfs  (229G)
  488396800328- free -  (164K)

be carefully with the correct number of the index, in our case 4; check
the output of 'gpart show -l ada0' before doing this:

# gpart delete -i 4 ada0

create the swap partition:

# gpart add -t freebsd-swap -l ssdswap -a 1m -s 8g ada0

and the rest is our 'ssdusrfs' again:

# gpart add -t freebsd-ufs -l ssdusrfs -a 1m ada0
# newfs -U -t /dev/gpt/ssdusrfs

the new /etc/fstab should look like this:

# DeviceMountpoint  FStype  Options DumpPass#
/dev/gpt/ssdswapnoneswapsw  0   0
/dev/gpt/ssdrootfs  /   ufs rw  1   1
/dev/gpt/ssdvarfs   /varufs rw  2   2
tmpfs   /tmptmpfs   rw,mode=01777   0   0
/dev/gpt/ssdusrfs   /usrufs rw  2   2


we need gzip and some shared libs (which normaly are in /usr); I copied
them on some other system into the externals disk where the DUMP is:

# cp -p /usr/bin/gzip /usr/lib/liblzma.so.5 /usr/lib/libbz2.so.4 /mnt

now mount and restore the DUMP:

# mount tmpfs
# mount /usr
# cd /usr
# mount -o ro /dev/da0s2a /mnt

# LD_LIBRARY_PATH=/mnt export LD_LIBRARY_PATH
# gzip -dc /mnt/e6330/dumpse6330-20160726/usr.dmp.gz | restore -x -f -
# umount /mnt
# reboot



-- 
Matthias Apitz, ✉ g...@unixarea.de, ⌂ http://www.unixarea.de/  ☎ 
+49-176-38902045
"Wer übersieht, dass wir uns den anderen weggenommen haben und sie uns 
wiederhaben wollen,
kann von den Kämpfen der letzten Tage keinen verstehen. Und kann natürlich auch 
keinen
dieser Kämpfe bestehen." Hermann Kant in jW 1.10.1989
___
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: seldom crashes on Dell E6330 with 12-CURRENT

2016-07-26 Thread Mark Millard
> On 2016-Jul-26, at 1:41 AM, Matthias Apitz  wrote:
> 
> I just got a new panic with drop to debugger after shutdown, all disks
> have synced correctly, only something to page-in from swap was causing
> the problem; I don't know how to get a screen-shoot from this, so I took
> a picture, it's here http://www.unixarea.de/panic.jpg
> 
> Btw: how can the kernel read from a swapfile if the file system is
> already unmounted?

I've no clue how the kernel is supposed to make sure that it does not need to 
use swap content that late. The answers to your question are well outside my 
knowledge base. I do not remember getting such a result myself.

Hopefully someone else can help or use your report to analyze the issue. You 
may want to submit a problem report in bugzilla for what happened, describing 
the context that it happened in.

>   matthias

===
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: seldom crashes on Dell E6330 with 12-CURRENT

2016-07-26 Thread Matthias Apitz

I just got a new panic with drop to debugger after shutdown, all disks
have synced correctly, only something to page-in from swap was causing
the problem; I don't know how to get a screen-shoot from this, so I took
a picture, it's here http://www.unixarea.de/panic.jpg

Btw: how can the kernel read from a swapfile if the file system is
already unmounted?

matthias
-- 
Matthias Apitz, ✉ g...@unixarea.de, ⌂ http://www.unixarea.de/  ☎ 
+49-176-38902045
"Wer übersieht, dass wir uns den anderen weggenommen haben und sie uns 
wiederhaben wollen,
kann von den Kämpfen der letzten Tage keinen verstehen. Und kann natürlich auch 
keinen
dieser Kämpfe bestehen." Hermann Kant in jW 1.10.1989
___
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: seldom crashes on Dell E6330 with 12-CURRENT

2016-07-26 Thread Mark Millard
On 2016-Jul-25, at 10:50 PM, Matthias Apitz  wrote:
> 
> El día Monday, July 25, 2016 a las 05:00:59PM -0700, Mark Millard escribió:
> 
>> Matthias Apitz guru at unixarea.de wrote on Mon Jul 25 16:10:52 UTC 2016 :
>> 
>>> On Monday, 25 July 2016 17:11:23 CEST, Eric van Gyzen >> FreeBSD.org> wrote: > 
 What file system are you using? 
>>> UFS; I followed the good instructions about new SSD disk configuration; 
>>> that's why I now have swap as plain file :-( 
>> 
>> Unfortunately see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206048 :
>> 
>> 11.0-CURRENT -r293227 (and others) arm (rpi2/BeagleBone Black) amd64 etc: 
>> swapfile usage hangs; swap partition works .
>> 
>> As far as I know it still applies for the problems that can occur for 
>> plain-file based swap files. The list of comments covers more than just 
>> armv6 as having example failures.
>> 
> 
> Thanks for the pointer to the bug issue. I remembered, that I created
> the swap file as a so called sparse file (dd ... bs=1m seek=8192 count=0) and
> this is still visible with du(1):
> 
> # du -sh /usr/swap01 ; ls -lh /usr/swap01
> 95M   /usr/swap01
> -rw---  1 root  wheel   8,0G 25 jul.  08:19 /usr/swap01
> 
> I have now unmounted the swap and re-created it with real blocks:
> 
> # swapoff -a
> swapoff: removing /dev/md99 as swap device
> 
> # dd if=/dev/zero of=/usr/swap01 bs=1m count=8192
> 8192+0 records in
> 8192+0 records out
> 8589934592 bytes transferred in 43.594277 secs (197042712 bytes/sec)
> # du -sh /usr/swap01 ; ls -lh /usr/swap01
> 8,0G  /usr/swap01
> -rw---  1 root  wheel   8,0G 26 jul.  07:24 /usr/swap01
> 
> I will first give this a try. If the crash rehappens, I will move it to
> a real freebsd-swap partition.

FYI: All my uses and testing of swap files used such a dd command to populate 
the file with blocks. I've never even tried a sparse file for such a thing.

My experience indicates that this will not remove the problem if the swap file 
is in a file system on a partition with other file system activity (at least in 
the same file system?).

The only type of context that I've had a swap file work over lots of use is 
when I used a whole partition containing just one UFS file system that only had 
the swap file added after the UFS file system was created.  In other words: 
About the closest thing to being a swap partition that is still file based. 
I've only done this on TARGET_ARCH=powerpc and TARGET_ARCH=powerpc64. I tried 
it for them because TRIM was possible in the context: it was a SATA context 
with SSDs, not a USB context. (I did this during my very first FreeBSD 
experiments. I only learned later of problems with other variations.)

My other, later contexts do not have TRIM as possible (for example, USB) and so 
I did not do that. It is these that I had troubles with and later switched to 
using a swap partition instead.

[I will not have access to the powerpc's for weeks.]

> 
> While saying 'crash', I now remember that in the two cases which I named
> 'hard locked', the system was still alive in the sense of echoing typed
> chars, it was only impossible to start new commands or login on another
> console. This points too in the direction of a disk access or swap problem.
> 
> Thanks
> 
>   matthias


===
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: seldom crashes on Dell E6330 with 12-CURRENT

2016-07-25 Thread Matthias Apitz
El día Monday, July 25, 2016 a las 05:00:59PM -0700, Mark Millard escribió:

> Matthias Apitz guru at unixarea.de wrote on Mon Jul 25 16:10:52 UTC 2016 :
> 
> > On Monday, 25 July 2016 17:11:23 CEST, Eric van Gyzen  > FreeBSD.org> wrote: > 
> > > What file system are you using? 
> > UFS; I followed the good instructions about new SSD disk configuration; 
> > that's why I now have swap as plain file :-( 
> 
> Unfortunately see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206048 :
> 
> 11.0-CURRENT -r293227 (and others) arm (rpi2/BeagleBone Black) amd64 etc: 
> swapfile usage hangs; swap partition works .
> 
> As far as I know it still applies for the problems that can occur for 
> plain-file based swap files. The list of comments covers more than just armv6 
> as having example failures.
> 

Thanks for the pointer to the bug issue. I remembered, that I created
the swap file as a so called sparse file (dd ... bs=1m seek=8192 count=0) and
this is still visible with du(1):

# du -sh /usr/swap01 ; ls -lh /usr/swap01
 95M/usr/swap01
-rw---  1 root  wheel   8,0G 25 jul.  08:19 /usr/swap01

I have now unmounted the swap and re-created it with real blocks:

# swapoff -a
swapoff: removing /dev/md99 as swap device

# dd if=/dev/zero of=/usr/swap01 bs=1m count=8192
8192+0 records in
8192+0 records out
8589934592 bytes transferred in 43.594277 secs (197042712 bytes/sec)
# du -sh /usr/swap01 ; ls -lh /usr/swap01
8,0G/usr/swap01
-rw---  1 root  wheel   8,0G 26 jul.  07:24 /usr/swap01

I will first give this a try. If the crash rehappens, I will move it to
a real freebsd-swap partition.

While saying 'crash', I now remember that in the two cases which I named
'hard locked', the system was still alive in the sense of echoing typed
chars, it was only impossible to start new commands or login on another
console. This points too in the direction of a disk access or swap problem.

Thanks

matthias

-- 
Matthias Apitz, ✉ g...@unixarea.de, ⌂ http://www.unixarea.de/  ☎ 
+49-176-38902045
"Wer übersieht, dass wir uns den anderen weggenommen haben und sie uns 
wiederhaben wollen,
kann von den Kämpfen der letzten Tage keinen verstehen. Und kann natürlich auch 
keinen
dieser Kämpfe bestehen." Hermann Kant in jW 1.10.1989
___
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: seldom crashes on Dell E6330 with 12-CURRENT

2016-07-25 Thread Mark Millard
Matthias Apitz guru at unixarea.de wrote on Mon Jul 25 16:10:52 UTC 2016 :

> On Monday, 25 July 2016 17:11:23 CEST, Eric van Gyzen  FreeBSD.org> wrote: > 
> > What file system are you using? 
> UFS; I followed the good instructions about new SSD disk configuration; 
> that's why I now have swap as plain file :-( 

Unfortunately see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206048 :

11.0-CURRENT -r293227 (and others) arm (rpi2/BeagleBone Black) amd64 etc: 
swapfile usage hangs; swap partition works .

As far as I know it still applies for the problems that can occur for 
plain-file based swap files. The list of comments covers more than just armv6 
as having example failures.

===
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: seldom crashes on Dell E6330 with 12-CURRENT

2016-07-25 Thread Matthias Apitz
On Monday, 25 July 2016 17:11:23 CEST, Eric van Gyzen 
 wrote:




What file system are you using?


UFS; I followed the good instructions about new SSD disk configuration; 
that's why I now have swap as plain file :-(



Do a full fsck (or zfs scrub).


will do a full fsck;


Try moving swap to a raw (freebsd-swap) partition so that you might get
a kernel core dump.  That will be the essential next step.


ok, I will dump /usr to some external disk, shrink
the partition, creat swap and re-create /usr



Without more details from a core dump or debugger, your best option is
to try a release or an older build.  If that works, try to find the
commit that introduced the behavior.  This will be very tedious and
time-consuming for your scenario, so definitely try getting a core dump
first.


the problem is as well: until now no further crashes had occured, i.e. it' 
difficult to see if it works or not;


matthias





--
Sent from my Ubuntu phone
http://www.unixarea.de/
___
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: seldom crashes on Dell E6330 with 12-CURRENT

2016-07-25 Thread Eric van Gyzen
On 07/23/16 02:21 AM, Matthias Apitz wrote:
> 
> Hello,
> 
> I own since July 15 a new laptop and faced 3 crashes, details see below.
> What can I do to gather more information? Thanks
> 
> 
> notes in general:
> - hardware: Dell E6330, amd64, 4 cores i5-3360M, 8 GByte RAM, 250 GByte SSD 
> w/ TRIM
> - WLAN: urtwn0: MAC/BB RTL8188CUS, RF 6052 1T1R
> - kernel: GENERIC r302904 (July 15)
> - poudriere 3.2-pre: compiling ~1800 ports in 4 builders
> - swap as plain file in /usr/swap01, 8 GByte
> - apart of the crashes below, no crash during buildworld, buildkernel and
>   ~48 hours of poudriere fetching distfiles and making ~1800 ports
> - no errors on 'memtest 1G'
> 
> crashes/observations:
> 
> 16.07.2016 07:12 
> - on shutdown swap device (plain file in /usr) could not be detached
> - drop to kdb
> - nothing in /var/log/messages
> 
> 17.07.2016 19:41
> - hard locked, had to power-off
> - last command issued on console (no X11): cp -p * /usr/PKGDIR (around 1700 
> files, 2 GByte)
> - nothing in /var/log/messages
> 
> 20.07.2016 19:27
> - hard locked, had to power-off
> - last command issued in xterm: fgrep mra... ~/*
> - nothing in /var/log/messages

What file system are you using?

Do a full fsck (or zfs scrub).

Try moving swap to a raw (freebsd-swap) partition so that you might get
a kernel core dump.  That will be the essential next step.

Without more details from a core dump or debugger, your best option is
to try a release or an older build.  If that works, try to find the
commit that introduced the behavior.  This will be very tedious and
time-consuming for your scenario, so definitely try getting a core dump
first.

Eric
___
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"


seldom crashes on Dell E6330 with 12-CURRENT

2016-07-23 Thread Matthias Apitz

Hello,

I own since July 15 a new laptop and faced 3 crashes, details see below.
What can I do to gather more information? Thanks


notes in general:
- hardware: Dell E6330, amd64, 4 cores i5-3360M, 8 GByte RAM, 250 GByte SSD w/ 
TRIM
- WLAN: urtwn0: MAC/BB RTL8188CUS, RF 6052 1T1R
- kernel: GENERIC r302904 (July 15)
- poudriere 3.2-pre: compiling ~1800 ports in 4 builders
- swap as plain file in /usr/swap01, 8 GByte
- apart of the crashes below, no crash during buildworld, buildkernel and
  ~48 hours of poudriere fetching distfiles and making ~1800 ports
- no errors on 'memtest 1G'

crashes/observations:

16.07.2016 07:12 
- on shutdown swap device (plain file in /usr) could not be detached
- drop to kdb
- nothing in /var/log/messages

17.07.2016 19:41
- hard locked, had to power-off
- last command issued on console (no X11): cp -p * /usr/PKGDIR (around 1700 
files, 2 GByte)
- nothing in /var/log/messages

20.07.2016 19:27
- hard locked, had to power-off
- last command issued in xterm: fgrep mra... ~/*
- nothing in /var/log/messages

-- 
Matthias Apitz, ✉ g...@unixarea.de, ⌂ http://www.unixarea.de/  ☎ 
+49-176-38902045
"Wer übersieht, dass wir uns den anderen weggenommen haben und sie uns 
wiederhaben wollen,
kann von den Kämpfen der letzten Tage keinen verstehen. Und kann natürlich auch 
keinen
dieser Kämpfe bestehen." Hermann Kant in jW 1.10.1989
___
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"