Re: Rawtherapee 5.7 crashes in 6.6 amd64

2019-11-16 Thread Peter Varga
Yesa

On Sat, Nov 16, 2019, at 19:12, Merritt Draney wrote:
> I have tried to get Rawtherapee running unsuccessfully on my system. Is 
> anyone else having trouble? If I run it out of a terminal from a folder with 
> no pictures in it, it will start up fine. Then if I select a folder with 
> pictures in it (with the file browser) sometimes it will start loading them 
> once I have cleaned my cache files out but will not finish and will crash. 
> 
> Here are a couple logs I took running it through gdb like rawtherapee's site 
> states. I even rebuilt it from ports with the debug flag. They are a bit 
> above my head. I am not sure if it is Rawtherapee or an OpenBSD problem.
> 
> dbg log #1
>  9 thread 178416 futex () at -:3
>  8 thread 314953 0x097ac8386e6f in rtengine::ChunkyRGBData char>::computeHistogramAutoWB ()
>  from /usr/local/bin/rawtherapee
>  7 thread 216546 futex () at -:3
>  6 thread 608117 futex () at -:3
>  5 thread 157151 futex () at -:3
>  4 thread 262627 futex () at -:3
>  3 thread 574678 _thread_sys_poll () at -:3
> * 2 thread 354616 thrkill () at -:3
>  1 thread 137995 futex () at -:3
> 
> Thread 9 (thread 178416):
> #0 futex () at -:3
> No locals.
> #1 0x097cf91411b7 in _rthread_mutex_timedlock (mutexp=Variable "mutexp" 
> is not available.
> ) at include/machine/atomic.h:94
>  error = 83
>  self = 0x97cf9e36240
>  mutex = 0x97cf9189760
>  i = Variable "i" is not available.
> 3 in -
> 
> 
> dbg log #2
> 
>  4 thread 140590 access () at -:3
>  3 thread 193774 _thread_sys_poll () at -:3
> * 2 thread 318691 strlen () at 
> /usr/src/lib/libc/arch/amd64/string/strlen.S:154
>  1 thread 441315 0x050ace324d97 in ?? () from 
> /usr/local/lib/libiconv.so.7.0
> 
> Thread 4 (thread 140590):
> #0 access () at -:3
> No locals.
> #1 0x050a2e05a89d in g_file_test (filename=0x50a0172b580 
> "/home/merritt/.cache/RawTherapee/profiles/I
> MG_20191005_191245.jpg.6438ee363fdef4f66963858fd7362246.pp3", 
> test=G_FILE_TEST_EXISTS) at ../glib-2.60.7/g
> lib/gfileutils.c:439
> No locals.
> #2 0x0509f9324326 in Glib::file_test () from 
> /usr/local/lib/libglibmm-2.4.so.15.2
> No symbol table info available.
> #3 0x0507ea2d47d5 in rtengine::procparams::ProcParams::load () from 
> /usr/local/bin/rawtherapee
> No symbol table info available.
> #4 0x0507ea0aa386 in Thumbnail::loadProcParams () from 
> /usr/local/bin/rawtherapee
> No symbol table info available.
> #5 0x0507ea0a9fe4 in Thumbnail::Thumbnail () from 
> /usr/local/bin/rawtherapee
> No symbol table info available.
> #6 0x0507e9dcff03 in CacheManager::getEntry () from 
> /usr/local/bin/rawtherapee
> No symbol table info available.
> #7 0x0507ea01fb1c in PreviewLoader::Impl::processNextJob () from 
> /usr/local/bin/rawtherapee
> No symbol table info available.
> #8 0x0509f9349242 in (anonymous namespace)::call_thread_entry_slot () 
> from /usr/local/lib/libglibmm-2
> .4.so.15.2
> No symbol table info available.
> #9 0x050a2e0a48f8 in g_thread_pool_thread_proxy (data=0x509fcc79b80) at 
> ../glib-2.60.7/glib/gthreadpo
> ol.c:308
>  task = 0x50ac2c68050
>  pool = (GRealThreadPool *) 0x509fcc79b80
> #10 0x050a2e0a3775 in g_thread_proxy (data=0x50a6d6bf5e0) at 
> ../glib-2.60.7/glib/gthread.c:805
>  thread = (GRealThread *) 0x50a6d6bf5e0
> #11 0x050aa9a05df1 in _rthread_start (v=Variable "v" is not available.
> ) at /usr/src/lib/librthread/rthread.c:96
>  thread = Variable "thread" is not available.
> 154 movq (%rax),%rdx /* first data in high bytes */
> 
> 
> OpenBSD 6.6 (GENERIC.MP) #0: Sat Oct 26 08:08:07 MDT 2019
>  r...@syspatch-66-amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 17099640832 (16307MB)
> avail mem = 16568705024 (15801MB)
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xec150 (67 entries)
> bios0: vendor American Megatrends Inc. version "0211" date 03/07/2016
> bios0: ASUSTeK COMPUTER INC. A88X-PLUS/USB 3.1
> acpi0 at bios0: ACPI 5.0
> acpi0: sleep states S0 S3 S4 S5
> acpi0: tables DSDT FACP APIC FPDT MCFG HPET CRAT UEFI BGRT SSDT SSDT
> acpi0: wakeup devices PB21(S4) PB22(S4) PB31(S4) PB32(S4) PB33(S4) PB34(S4) 
> SBAZ(S4) PS2K(S4) UAR1(S4) OHC1(S4) EHC1(S4) OHC2(S4) EHC2(S4) OHC3(S4) 
> EHC3(S4) OHC4(S4) [...]
> acpitimer0 at acpi0: 3579545 Hz, 32 bits
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 16 (boot processor)
> cpu0: AMD Athlon(tm) X4 860K Quad Core Processor, 3691.18 MHz, 15-30-01
> cpu0: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,XOP,SKINIT,WDT,FMA4,TCE,NODEID,TBM,TOPEXT,CPCTR,DBKP,PERFTSC,ITSC,FSGSBASE,BMI1,XSAVEOPT
> cpu0: 96KB 64b/line 3-way I-cache, 16KB 64b/line 4-way D-cache, 2MB 64b/line 
> 16-way L2 cache
> cpu0: ITLB 48 

Rawtherapee 5.7 crashes in 6.6 amd64

2019-11-16 Thread Merritt Draney
I have tried to get Rawtherapee running unsuccessfully on my system.  Is anyone 
else having trouble?  If I run it out of a terminal from a folder with no 
pictures in it, it will start up fine.  Then if I select a folder with pictures 
in it (with the file browser) sometimes it will start loading them once I have 
cleaned my cache files out but will not finish and will crash.  

Here are a couple logs I took running it through gdb like rawtherapee's site 
states.  I even rebuilt it from ports with the debug flag.  They are a bit 
above my head.  I am not sure if it is Rawtherapee or an OpenBSD problem.

dbg log #1
  9 thread 178416  futex () at -:3
  8 thread 314953  0x097ac8386e6f in rtengine::ChunkyRGBData::computeHistogramAutoWB ()
 from /usr/local/bin/rawtherapee
  7 thread 216546  futex () at -:3
  6 thread 608117  futex () at -:3
  5 thread 157151  futex () at -:3
  4 thread 262627  futex () at -:3
  3 thread 574678  _thread_sys_poll () at -:3
* 2 thread 354616  thrkill () at -:3
  1 thread 137995  futex () at -:3

Thread 9 (thread 178416):
#0  futex () at -:3
No locals.
#1  0x097cf91411b7 in _rthread_mutex_timedlock (mutexp=Variable "mutexp" is 
not available.
) at include/machine/atomic.h:94
    error = 83
    self = 0x97cf9e36240
    mutex = 0x97cf9189760
    i = Variable "i" is not available.
3   in -


dbg log #2

 4 thread 140590  access () at -:3
  3 thread 193774  _thread_sys_poll () at -:3
* 2 thread 318691  strlen () at /usr/src/lib/libc/arch/amd64/string/strlen.S:154
  1 thread 441315  0x050ace324d97 in ?? () from 
/usr/local/lib/libiconv.so.7.0

Thread 4 (thread 140590):
#0  access () at -:3
No locals.
#1  0x050a2e05a89d in g_file_test (filename=0x50a0172b580 
"/home/merritt/.cache/RawTherapee/profiles/I
MG_20191005_191245.jpg.6438ee363fdef4f66963858fd7362246.pp3", 
test=G_FILE_TEST_EXISTS) at ../glib-2.60.7/g
lib/gfileutils.c:439
No locals.
#2  0x0509f9324326 in Glib::file_test () from 
/usr/local/lib/libglibmm-2.4.so.15.2
No symbol table info available.
#3  0x0507ea2d47d5 in rtengine::procparams::ProcParams::load () from 
/usr/local/bin/rawtherapee
No symbol table info available.
#4  0x0507ea0aa386 in Thumbnail::loadProcParams () from 
/usr/local/bin/rawtherapee
No symbol table info available.
#5  0x0507ea0a9fe4 in Thumbnail::Thumbnail () from 
/usr/local/bin/rawtherapee
No symbol table info available.
#6  0x0507e9dcff03 in CacheManager::getEntry () from 
/usr/local/bin/rawtherapee
No symbol table info available.
#7  0x0507ea01fb1c in PreviewLoader::Impl::processNextJob () from 
/usr/local/bin/rawtherapee
No symbol table info available.
#8  0x0509f9349242 in (anonymous namespace)::call_thread_entry_slot () from 
/usr/local/lib/libglibmm-2
.4.so.15.2
No symbol table info available.
#9  0x050a2e0a48f8 in g_thread_pool_thread_proxy (data=0x509fcc79b80) at 
../glib-2.60.7/glib/gthreadpo
ol.c:308
    task = 0x50ac2c68050
    pool = (GRealThreadPool *) 0x509fcc79b80
#10 0x050a2e0a3775 in g_thread_proxy (data=0x50a6d6bf5e0) at 
../glib-2.60.7/glib/gthread.c:805
    thread = (GRealThread *) 0x50a6d6bf5e0
#11 0x050aa9a05df1 in _rthread_start (v=Variable "v" is not available.
) at /usr/src/lib/librthread/rthread.c:96
    thread = Variable "thread" is not available.
154 movq    (%rax),%rdx /* first data in high bytes */


OpenBSD 6.6 (GENERIC.MP) #0: Sat Oct 26 08:08:07 MDT 2019
    
r...@syspatch-66-amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 17099640832 (16307MB)
avail mem = 16568705024 (15801MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xec150 (67 entries)
bios0: vendor American Megatrends Inc. version "0211" date 03/07/2016
bios0: ASUSTeK COMPUTER INC. A88X-PLUS/USB 3.1
acpi0 at bios0: ACPI 5.0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC FPDT MCFG HPET CRAT UEFI BGRT SSDT SSDT
acpi0: wakeup devices PB21(S4) PB22(S4) PB31(S4) PB32(S4) PB33(S4) PB34(S4) 
SBAZ(S4) PS2K(S4) UAR1(S4) OHC1(S4) EHC1(S4) OHC2(S4) EHC2(S4) OHC3(S4) 
EHC3(S4) OHC4(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 16 (boot processor)
cpu0: AMD Athlon(tm) X4 860K Quad Core Processor, 3691.18 MHz, 15-30-01
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,XOP,SKINIT,WDT,FMA4,TCE,NODEID,TBM,TOPEXT,CPCTR,DBKP,PERFTSC,ITSC,FSGSBASE,BMI1,XSAVEOPT
cpu0: 96KB 64b/line 3-way I-cache, 16KB 64b/line 4-way D-cache, 2MB 64b/line 
16-way L2 cache
cpu0: ITLB 48 4KB entries fully associative, 24 4MB entries fully associative
cpu0: DTLB 64 4KB entries fully associative, 64 4MB entries fully associative
cpu0: smt 0, core 0, 

Re: Home Nas -> Montreal BUG

2019-11-16 Thread Patrick Marchand
Hey,

Since I'm getting off-list questions from more than one person,
I'll post here as well.

On 11/15, Patrick Marchand wrote:
> I'll be playing around with DragonflyBSD Hammer2 (and multiple offsite
> backups) for a home NAS over the next few weeks. I'll probably do a
> presentation about the experience at the Montreal BSD user group afterwards.
> It does not require as many ressources as ZFS or BTRFS, but offers many
> similar features.

It's brand spanking new and I havent advertised much beyond Mastodon
and l'Agenda du Libre. (Somebody at work posted it in the work owned
meetup, but that's not a platform I want as a main base).

The actual link for the next event (on the 27th of november) is
here: https://agendadulibre.qc.ca/events/2050, I'm planning it as
a free (as in free of scheduled activities) session where people
will have access to food, drinks and wifi so they can ask configuration
questions, install a BSD, work on a port, etc..

We've had one meeting already (https://agendadulibre.qc.ca/events/2038),
where I presented my experience with building an OpenBSD based home
router and we had a round table of discussion on BSD systems in
general. Including me and two work colleagues, we were 10 people
(I honestly thought nobody would come at first, so I'm happy!).
I'll post the slides online soon.

Format wise I'm thinking of holding it monthly, alternating
presentations and free sessions. Presentations can be given in the
language of your choice, but french is encouraged. Nothing is set
in stone yet, so we'll see how it evolves. I do need to create a
website, mailing list and caldav for it, but for now questions and
ideas for presentations can be sent to m...@patrickmarchand.com or
@mathuin@bsd.network (mastodon)

Au plaisir



Re: build error on octeon, 6.6

2019-11-16 Thread Theo de Raadt
Christian Groessler  wrote:

> > the src is not at /usr/src, so i'm going to dig deeper.
> 
> 
> (not a native English speaking person) Did you want to say "*not*
> going to dig deeper"?

indeed.

not going to dig deeper.

problem at your end.



Re: build error on octeon, 6.6

2019-11-16 Thread Christian Groessler

On 2019-11-16 18:36, Theo de Raadt wrote:

Diana Eichert  wrote:


Have you tried restarting make at the point it failed?

I remember trying to compile ports on my Ubiquiti SG and a build failed.
I can't remember who I contacted on @openbsd ports but they mentioned
I should try do that and some of the ports would continue on then fail later.
I ended up buying an Ubiquiti SG Pro which has not shown the same
issue.



Diana, it's not a port build that fails, but the build of the base system.



i do builds every day.  obviously the tree is not broken, or i would
be fixing it.



We are talking about 6.6 release, not current devel version.
And, sure, this worked somehow somewhere, how else could the 
installation tarballs

exist?



i'm not even looking at those build logs.



I had added them just to back up what I saw.



the src is not at /usr/src, so i'm going to dig deeper.



(not a native English speaking person) Did you want to say "*not*
going to dig deeper"?


regards,
chris



Re: Iked/unbound

2019-11-16 Thread Dale C.
I'm not seeing anything helpful there.

I have worked out the pf problem, still have difficulty with how to
pass DNS to the resolver on the responder.

Dale

On 11/16/19, Clay Daniels  wrote:
> Check out this:
>
> https://man.openbsd.org/iked.8
>
> History
>
> The iked program was written by Matthew Grooms ( mgro...@shrew.net ) as
> part of the Shrew Soft ( http://www.shrew.net ) family of IPsec products.
>
> On Sat, 16 Nov 2019, Dale C. wrote:
>
>> Date: Sat, 16 Nov 2019 12:44:21 -0700
>> From: Dale C. 
>> To: misc@openbsd.org
>> Subject: Iked/unbound
>>
>> Hi there,
>>
>> I'm trying to setup iked. I have it working with the exception of DNS.
>>
>> I've put the responders conf files here: https://bpaste.net/raw/LH4O2
>>
>> My question is, what is the right way to forward DNS to a local
>> unbound resolver on the responder?
>>
>> I'm also not sure why I need the line: pass in quick from 
>> in the responders pf.conf... I can't connect without it, though the
>> preceeding lines should be allowing that connection?
>>
>> Thanks for any clarification!
>>
>> Dale
>>
>>
>
> clays.sh...@sdf.org
> SDF Public Access UNIX System - http://sdf.org
>



Re: Home NAS

2019-11-16 Thread Karel Gardas

On 2019-11-15 14:34, Rafael Possamai wrote:

My experience with ZFS (FreeNAS for the most part) is that it becomes more
"expensive" to expand your pool after the fact (for a couple of different
reasons, see below),


That's probably case with more complex ZFS RAID setup, but for this 
particular usage RAID1 should be fine (OP preferred AFAIK on backup box) 
and expanding ZFS RAID1 is a matter of few commands and hardware work. I 
expanded ZFS RAID1 from old SXDE I don't remember year, 160 GB -> 500 GB 
-> 1TB over the years. I used the same trick to even switch from hdd to 
ssd, 1TB -> 1TB. Basically the only thing you need is to put your new 
drive(s) into the system and attach (zfs attach!) it to mirror, wait for 
resilver and then detach (zfs detach!) the old drives. You can then 
detach drives physically form the box. Anyway once your mirror is built 
of bigger drives it expands automatically.


Karel



Re: Home NAS

2019-11-16 Thread Karel Gardas

On 2019-11-14 15:26, Jan Betlach wrote:


Hi guys,

I am setting up a home NAS for five users. Total amount of data stored 
on NAS will not exceed 5 TB.
Clients are Macs and OpenBSD machines, so that SSHFS works fine from 
both (no need for NFS or Samba).

I am much more familiar and comfortable with OpenBSD than with FreeBSD.
My dilema while stating the above is as follows:

Will the OpenBSD’s UFS stable and reliable enough for intended purpose? 


Software-wise, OpenBSD's UFS is probably rock solid. The only possible 
issues reported going years back is usage of softdep which is not 
switched on by default so you don't need to worry anyway.


NAS will consist of just one encrypted drive, regularly backed to 
hardware RAID encrypted two-disks drive via rsync.


I'm not sure this is the best strategy.

Should I byte the bullet and build the NAS on FreeBSD taking advantage 
of ZFS, snapshots, replications, etc? Or is this an overkill?


ZFS is never overkill. Be you, I would consider to use ZFS for NAS with 
2 drives in RAID1 -- so self healing is usable if some drive or cable is 
not healthy enough. And then backup that to another ZFS box with again 2 
drive in RAID1. If you would use kind of similar OSes there with the 
same ZFS level support, then you would be even able to use zfs 
send/receive functionality which will easy/speedup a lot your NAS 
backups to the backup server/NAS.


Karel



Re: Home NAS

2019-11-16 Thread Karel Gardas




On 2019-11-15 16:02, pierre1.bar...@orange.com wrote:

Hello,

I tried a home NAS with ZFS, then BTRFS. Those filesystems needs tons of RAM 
(~1 GB of RAM by TB of disk), preferably ECC.


For NAS you prefer ECC anyway and 1 GB RAM consumption per 1 TB of drive 
is urban legend probably passed by folks using deduplication. OP even 
does not list dedup requirements so I'd leave that out of table and 
reduce whatever ZFS RAM usage is by appropriate ZFS option. Years ago I 
started using ZFS on 1GB RAM/AMD Athlon 64 and it was fine, I just 
lowered ZFS cache RAM limit a bit.



I found it very expensive for home usage, so I wouldn't recommend it.


I'm running it on several workstations (SunOS/Linux) and most 
importantly (for OP) also on very old wife's computer (athlon x2, 4GB 
RAM -- only!) and it runs fine. Wife's computer is primary example since 
up to recently I've got several checksum errors on it per week (btw all 
computers with ZFS are running RAID1 mirror to support self-healing) 
which I fixed after several months by switching to new SATA cables. But 
anyway, ZFS saved quite a lot of data form errors which would go 
unnoticed if she would run anything else (well besides btrfs and my 
experimental RAID1 softraid with checksumming I'm tinkering on another 
box here. :-)



Recovy systems were also inexistent at the time (no btrfsck), I don't know if 
it has improved since.

I ended with LVM : cheap to implement and very easy to extend. I am very happy 
with it.


And bitrot solution?

Karel



Re: Iked/unbound

2019-11-16 Thread Clay Daniels

Check out this:

https://man.openbsd.org/iked.8

History

The iked program was written by Matthew Grooms ( mgro...@shrew.net ) as 
part of the Shrew Soft ( http://www.shrew.net ) family of IPsec products.


On Sat, 16 Nov 2019, Dale C. wrote:


Date: Sat, 16 Nov 2019 12:44:21 -0700
From: Dale C. 
To: misc@openbsd.org
Subject: Iked/unbound

Hi there,

I'm trying to setup iked. I have it working with the exception of DNS.

I've put the responders conf files here: https://bpaste.net/raw/LH4O2

My question is, what is the right way to forward DNS to a local
unbound resolver on the responder?

I'm also not sure why I need the line: pass in quick from 
in the responders pf.conf... I can't connect without it, though the
preceeding lines should be allowing that connection?

Thanks for any clarification!

Dale




clays.sh...@sdf.org
SDF Public Access UNIX System - http://sdf.org



Iked/unbound

2019-11-16 Thread Dale C.
Hi there,

I'm trying to setup iked. I have it working with the exception of DNS.

I've put the responders conf files here: https://bpaste.net/raw/LH4O2

My question is, what is the right way to forward DNS to a local
unbound resolver on the responder?

I'm also not sure why I need the line: pass in quick from 
in the responders pf.conf... I can't connect without it, though the
preceeding lines should be allowing that connection?

Thanks for any clarification!

Dale



Re: build error on octeon, 6.6

2019-11-16 Thread Theo de Raadt
Diana Eichert  wrote:

> Have you tried restarting make at the point it failed?
> 
> I remember trying to compile ports on my Ubiquiti SG and a build failed.
> I can't remember who I contacted on @openbsd ports but they mentioned
> I should try do that and some of the ports would continue on then fail later.
> I ended up buying an Ubiquiti SG Pro which has not shown the same
> issue.

i do builds every day.  obviously the tree is not broken, or i would
be fixing it.

i'm not even looking at those build logs.

the src is not at /usr/src, so i'm going to dig deeper.



Re: build error on octeon, 6.6

2019-11-16 Thread Diana Eichert
Have you tried restarting make at the point it failed?

I remember trying to compile ports on my Ubiquiti SG and a build failed.
I can't remember who I contacted on @openbsd ports but they mentioned
I should try do that and some of the ports would continue on then fail later.
I ended up buying an Ubiquiti SG Pro which has not shown the same
issue.

just an idea

diana



Re: Home NAS

2019-11-16 Thread Jean-François Simon
Hi,

I remind there was an incremental backup which I used to run in cron,
doing good job of making daily, weekly and monthly backups of deltas.

I could not find the name of this, it was available from packages as far as I 
remember
and created directory trees to the dates filled in with only modified files.

Jean-François 

Le 15 nov. 2019 à 11:04, Raf Czlonka a écrit :

> On Fri, Nov 15, 2019 at 08:54:54AM GMT, Andrew Luke Nesbit wrote:
>> On 15/11/2019 10:11, gwes wrote:
>> 
>>> The backup(8) program can assist this by storing deltas so that
>>> more frequent backups only contain deltas from the previous
>>> less frequent backup.
>> 
>> I've not used backup(8) before, thanks for the suggestion.  I will have a
>> look.
>> 
> 
> Hi Andrew,
> 
> There is no backup(8) - gwes either meant a generic "backup" software,
> or dump(8), and restore(8), specifically.
> 
> Regards,
> 
> Raf
> 



Re: Home NAS

2019-11-16 Thread Predrag Punosevac
Paolo Aglialoro wrote:

> A fundamental element missing from the 1st mail is on which hardware should
> run your software-defined NAS and for which use.
> 
> I exclude you are talking about several nodes, on which you can run Ceph or
> GlusterFS filesystems.
> 

"Ceph & Gluster are WILDLY different solutions to different problems."

https://www.reddit.com/r/sysadmin/comments/9onemk/ceph_vs_glusterfs/

OP is taking about home NAS. That pretty much means that the files will
be accessed by SSHFS, NFS, or CIFS. Note that OmniOS has a kernel
implementation of CIFS unlike FreeBSD. GlusterFS just like SSHFS, NFS,
or CIFS allows access to files from multiple hosts sharing via a
computer network with some added dough. Those files still have to be
stored on the HW/Soft RAID on the top of some file system UFS, H1/2,
ZFS, XFS.  I am only aware of the native Linux GlusterFS client. For all
practical purposes you will be using NFS client.  Deciding between
GlusterFS vs NFS is not an easy thing

https://www.catalyst.net.nz/blog/our-glusterfs-experiences

Quite a few US national laboratories and super computing centers use
GlusterFS typically Red Hat (or clones) servers. Red Hat has officially
support only XFS storage. However most people use ZFS as a backend. ZFS
is a third party kernel module on Linux which is very adverse to such
modules. It is major pain in the rear end to run comparing to Illumos or
FreeBSD but I know lot of big shops who are doing exactly that.
Personally if I had to design such a large network-attached distributed
storage file system I would use non-Linux ZFS for a backend which will
be mounted via iSCSI on Red Hat (or clone) GlusterFS servers. FreeBSD
iSCSI implementation used to be PITA and an afterthought. Illumis has an
excellent iSCSI implementation but I understand why most people will be
apprehensive about deploying anything Illumos based.

I have no idea how is any of this related to OpenBSD or for that matter
any BSD since initial FreeBSD port of GlusterFS is obsolete not upgraded
for many years.


> Is it a single full size multi-disk server planned for intensive activity?
> In this case don't reinvent the wheel, you got:
> - FreeNAS
> - napp-it (over solaris/omnios/openindiana)
> - Nexenta

This is a really bad advise! As somebody who foolishly  built a few
FreeNAS based sites and dismantled many more as paid jobs I could not
agree more with this blog post

https://smbitjournal.com/tag/freenas/


Again this has nothing to do with OpenBSD.

OpenBSD file server with soft RAID1 mirror (for high availability and
redundancy) will be more than adequate for most home users. It is super
simple and sysutils/bitrot is sufficient protection from slow decay. 


Predrag


> Just don't forget to substitute whatever raid SAS controller with an IT
> mode enabled one (e.g. LSI 2308) in order to really benefit of ZFS.
> 
> Is it for home use? Why not considering some low consumption hardware? If
> you want multidisk RAID just buy a qnap/synology.
> 
> If one disk is enough, buy Odroid HC2 which mounts 3.5" SATA disks, where a
> 6TB one fits perfectly. Dunno if OpenBSD may install on it (armhf v7 arch),
> but for sure either armbian or openmediavault are good choices to run on,
> having full 1Gb/s throughput and consuming even less current than some
> famous brand NAS, like the ones named before.
> 
> This said, if the aim of the project is just having fun creating a NAS from
> scratch on casual hardware running OpenBSD for the sake of it, I shut my
> mouth.
> 
> Have phun!



Re: heavy CPU consumption and laggy/stuttering video on thinkpad x230

2019-11-16 Thread Joe Davis
This may come across as a strange question, but is the microphone
disabled in the BIOS? The azalia driver has(had?) some issues with that
before. 

Cheers,
Joe



Re: 'machine/cdefs.h' file not found when installing nokogiri gem

2019-11-16 Thread mabi
‐‐‐ Original Message ‐‐‐
On Saturday, November 16, 2019 2:38 PM, Stuart Henderson  
wrote:

> For native extensions, it's really best to install from packages.
>
> pkg_add ruby25-nokogiri

Thanks for the tip, I didn't think about that alternative. What puzzles me is 
that I managed to install that nokogiri gem on OpenBSD 6.4 using 'gem install' 
in the past. Will have to check with 6.6.



Re: httpd redirect

2019-11-16 Thread Thomas
Ted, I feel so stupid nowof course this is impossible...thanks for
the answer!

All the best,
Thomas

On 16.11.19 07:39, Ted Unangst wrote:
> Thomas wrote:
>> Hi,
>>
>> I need to do this redirect with httpd:
>>
>> from:
>> http://my.old.site/#info
>> to:
>> https://my.new.site/products/product.html
> 
> browsers don't send #fragments to the server. so short answer: impossible.
> 
> 




Re: vi in ramdisk?

2019-11-16 Thread Raymond, David
Arch Linux uses nano in its boot drive.  Pretty simple, gets the job
done.  (They also include vi.)

Dave Raymond

On 11/16/19, Roderick  wrote:
>
> On Sat, 16 Nov 2019, U'll Be King of the Stars wrote:
>
>> I assumed that the canonical reference for ed was K, "The Unix
>> Programming
>
> Reference = man page. Under /usr/share/doc/usd/ in an old BSD System
> you may find Brian W. Kernighan ed Tutorial. Just google for it.
>
>> Sam looks very interesting too,
>
> Yes. It is a perfectionated ed, not anymore line oriented, and with gui.
> I am tired of emacs bloating and I am thinking on sam as an alternative,
> but the background colour is annoying.
>
>> What is sos?  Is it something like open mode in Vi?
>
> Editor in DEC 10 with TOPS-10, I think standard there.
>
> Rod.
>
>


-- 
David J. Raymond
david.raym...@nmt.edu
http://physics.nmt.edu/~raymond



Re: 'machine/cdefs.h' file not found when installing nokogiri gem

2019-11-16 Thread Stuart Henderson
On 2019-11-16, mabi  wrote:
> Hi,
>
> I am trying to install the nokogiri Ruby gem using "gem install nokogiri" and 
> have the ruby-2.5.5 package from ports for that purpose installed.
>
> Unfortunately it does not want to install complaining that the 
> 'machine/cdefs.h' header file can not be found. This header file is included 
> on line 41 of /usr/include/sys/cdefs.h but is not present on my OpenBSD 6.5 
> system. Am I missing something here?
>
> I have pasted below the full error output from installing that gem if that is 
> of any help.

For native extensions, it's really best to install from packages.

pkg_add ruby25-nokogiri



Re: Home NAS

2019-11-16 Thread Paolo Aglialoro
A fundamental element missing from the 1st mail is on which hardware should
run your software-defined NAS and for which use.

I exclude you are talking about several nodes, on which you can run Ceph or
GlusterFS filesystems.

Is it a single full size multi-disk server planned for intensive activity?
In this case don't reinvent the wheel, you got:
- FreeNAS
- napp-it (over solaris/omnios/openindiana)
- Nexenta
Just don't forget to substitute whatever raid SAS controller with an IT
mode enabled one (e.g. LSI 2308) in order to really benefit of ZFS.

Is it for home use? Why not considering some low consumption hardware? If
you want multidisk RAID just buy a qnap/synology.

If one disk is enough, buy Odroid HC2 which mounts 3.5" SATA disks, where a
6TB one fits perfectly. Dunno if OpenBSD may install on it (armhf v7 arch),
but for sure either armbian or openmediavault are good choices to run on,
having full 1Gb/s throughput and consuming even less current than some
famous brand NAS, like the ones named before.

This said, if the aim of the project is just having fun creating a NAS from
scratch on casual hardware running OpenBSD for the sake of it, I shut my
mouth.

Have phun!

Il sab 16 nov 2019, 07:11 Jordan Geoghegan  ha scritto:

>
> On 2019-11-15 20:47, Predrag Punosevac wrote:
> > Jan Betlach wrote:
> >
> > [snip]
> >
> >> 2. A HP P222 array controller works right out of the box on
> >> OpenBSD, maybe FreeBSD as well but the combination of ZFS and RAID
> >> controller seems weird to me.
> >>
> > FreeBSD has a better support for HWRaid cards than OpenBSD. I am talking
> > about serious HWRaid cards like former LSI Controllers. Only Areca used
> > to fully support OpenBSD. Also FreeBSD UFS journaling is more advanced
> > than OpenBSD journaling.
>
> OpenBSD's UFS doesn't do any journalling.
>
> [snip]
>
> >> 3. OpenBSD is actually out of my expectation. CIFS and NFS is just
> >> easy to setup. The most fabulous thing to me is the full disk
> >> encryption. I had a disk failure and the array controller was burnt
> >> once because I had some cooling issue. However, I was confident to get
> >> a replacement and no data was lost.
> >
> > OpenBSD NFS server implementation is slow comparing to others but for
> > home users YMMV.
> I was able to get Gigabit line rate from an OpenBSD NAS to CentOS
> clients no problem. The OpenBSD NFS client is admittedly somewhat slow--
> I was only able to get ~70MB/s out of it when connected to the same NAS
> that gets 100MBps+ from Linux based NFS clients.
> >
> > Code:
> > # bioctl sd4
> > Volume  Status   Size Device
> > softraid0 0 Online  2000396018176 sd4 RAID1
> >0 Online  2000396018176 0:0.0   noencl 
> >1 Online  2000396018176 0:1.0   noencl 
> >
> > is very crude. It took me 4 days to rebuild 1TB mirror after accidental
> > power off one HDD. That is just not something usable for a storage
> > purpose in real life.
>
> I have an OpenBSD NAS at home with 20TB of RAID1 storage comprised of 10
> 4TB drives. Last time I had to rebuild one of the arrays, it took just
> under 24 hours to rebuild. This was some months ago, but I remember
> doing the math and I was getting just under 50MB/s rebuild speed. This
> was on a fairly ancient Xeon rig using WD Red NAS drives. If it took
> your machine 4 days to rebuild a 1TB mirror, something must be wrong,
> possibly hardware related as that's less than 4MB/s rebuild speed.
>
> >
> > At work where I have to store petabytes of data I use only ZFS. At home
> > that is another story.
> >
> > For the record BTRFS is a vaporware and I would never store the pictures
> > of my kids to that crap.
> >
> > Cheers,
> > Predrag
>
> Cheers,
>
> Jordan
>
>


Re: heavy CPU consumption and laggy/stuttering video on thinkpad x230

2019-11-16 Thread Stuart Henderson
On 2019-11-16, David Trudgian  wrote:
> I have also set the following systcl values:
>
> # shared memory limits (browsers, etc.)
> # max shared memory pages (*4096=8GB)
> kern.shminfo.shmall=20971552
> # max shared memory segment size (2GiB)
> kern.shminfo.shmmax=2147483647
> # max shared memory identifiers
> kern.shminfo.shmmni=1024
> # max shared memory segments per process
> kern.shminfo.shmseg=1024

Very few programs use SysV shared memory. Use ipcs -pm and check the
CPID column for process ids. On my workstation (running several browsers
and sone other things) the only processes using this are MuPDF and
PostgreSQL (only a little, the systctl defaults are probably fine).

> # Other
> kern.maxproc=32768
> kern.maxfiles=131072
> kern.maxvnodes=262144
> kern.bufcachepercent=50
>
> The large files numbers here are due to using syncthing, and (I'd guess)
> probably not generally advisable. The other stuff is quite likely to be
> inadvisable or just plain wrong (due to my inexperience), but it has
> given me a responsive system when using Firefox / Chromium, playing
> video etc.

That is very high for maxproc. 

If syncthing uses kqueue to monitor for changes and monitors a large
number of files then raising maxfiles is expected.

Generally don't touch bufcachepercent, it likely doesn't do what you
think it does.

Not sure about maxvnodes, I don't know what the tradeoffs are.




Re: teco, and Re: vi in ramdisk?

2019-11-16 Thread Stuart Henderson
On 2019-11-15, gwes  wrote:
> Still not huge. I don't know what the current upper limit for
> programs in the install medium is. As this is a totally irrelevant
> thread, I suspect that squashing teco into the single install
> executable would only raise it 250K because it uses only very
> vanilla libraries.

It varies per-arch / ramdisk type, but we have deleted drivers to save
significantly less than 250K. Some are quite tight, others less so.




'machine/cdefs.h' file not found when installing nokogiri gem

2019-11-16 Thread mabi
Hi,

I am trying to install the nokogiri Ruby gem using "gem install nokogiri" and 
have the ruby-2.5.5 package from ports for that purpose installed.

Unfortunately it does not want to install complaining that the 
'machine/cdefs.h' header file can not be found. This header file is included on 
line 41 of /usr/include/sys/cdefs.h but is not present on my OpenBSD 6.5 
system. Am I missing something here?

I have pasted below the full error output from installing that gem if that is 
of any help.

Best regards,
Mabi


$ gem install nokogiri

Building native extensions. This could take a while...
ERROR:  Error installing nokogiri:
ERROR: Failed to build gem native extension.

current directory: /home/ma/.gem/gems/nokogiri-1.10.5/ext/nokogiri
/usr/local/bin/ruby25 -r ./siteconf20191116-77258-1qm6dzx.rb extconf.rb
checking if the C compiler accepts  -I /usr/local/include... *** extconf.rb 
failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/bin/$(RUBY_BASE_NAME)25
--help
--clean
--use-system-libraries
/usr/local/lib/ruby/2.5/mkmf.rb:456:in `try_do': The compiler failed to 
generate an executable file. (RuntimeError)
You have to install development tools first.
from /usr/local/lib/ruby/2.5/mkmf.rb:574:in `block in try_compile'
from /usr/local/lib/ruby/2.5/mkmf.rb:521:in `with_werror'
from /usr/local/lib/ruby/2.5/mkmf.rb:574:in `try_compile'
from extconf.rb:138:in `nokogiri_try_compile'
from extconf.rb:162:in `block in add_cflags'
from /usr/local/lib/ruby/2.5/mkmf.rb:632:in `with_cflags'
from extconf.rb:161:in `add_cflags'
from extconf.rb:416:in `'

To see why this extension failed to compile, please check the mkmf.log which 
can be found here:

  /home/ma/.gem/extensions/x86_64-openbsd/2.5/nokogiri-1.10.5/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /home/ma/.gem/gems/nokogiri-1.10.5 for 
inspection.
Results logged to 
/home/ma/.gem/extensions/x86_64-openbsd/2.5/nokogiri-1.10.5/gem_make.out

*** Content of the nokogiri-1.10.5/mkmf.log file below: ***

"cc -o conftest -I/usr/local/include/ruby-2.5/x86_64-openbsd 
-I/usr/local/include/ruby-2.5/ruby/backward -I/usr/local/include/ruby-2.5 -I. 
-DOPENSSL_NO_STATIC_ENGINE -I/usr/local/include   -O2 -pipe -fPIC  -I 
/usr/local/include conftest.c  -L. -L/usr/local/lib -Wl,-rpath,/usr/local/lib 
-L. -L/usr/local/lib -fstack-protector -Wl,-E -Wl,-rpath,/usr/local/lib 
-L/usr/local/lib -lruby25  -pthread -lgmp -lm   -lc "
In file included from conftest.c:1:
In file included from /usr/local/include/ruby-2.5/ruby.h:33:
In file included from /usr/local/include/ruby-2.5/ruby/ruby.h:29:
In file included from /usr/local/include/ruby-2.5/ruby/defines.h:112:
In file included from /usr/include/stdio.h:41:
/usr/include/sys/cdefs.h:41:10: fatal error: 'machine/cdefs.h' file not found
#include 
 ^
1 error generated.
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5:   return 0;
6: }
/* end */














Re: heavy CPU consumption and laggy/stuttering video on thinkpad x230

2019-11-16 Thread Michael H
*David, sorry for the repeated message. I realized that reply only went out
to you alone and not the mailing list :P

Here's what I have tried:

setup the xorg.conf file to tell it to use the intel driver instead of
modesetting
#/etc/X11/xorg.conf.d/20-intel.conf
Section "Device"
   Identifier "inteldrm"
   Driver "intel"
EndSection

modified login.conf and increased datasize-cur for staff class from 1536M
to 4096M
#/etc/login.conf
staff:\
:datasize-cur=4096M:\
:datasize-max=infinity:\
:maxproc-max=512:\
:maxproc-cur=256:\
:ignorenologin:\
:requirehome@:\
:tc=default:

Here are the new dmesg and Xorg.0.log:
dmesg
http://ix.io/21Ux

Xorg.0.log:
http://ix.io/21Uy
noticed this in the beginning of the Xorg.0.log file.
[   266.934] (WW) checkDevMem: failed to open /dev/xf86 and /dev/mem
(Operation not permitted)
Check that you have set 'machdep.allowaperture=1'
in /etc/sysctl.conf and reboot your machine
refer to xf86(4) for details
[   266.934] linear framebuffer access unavailable

terminal message from mpv when viewing a live video from twitch:
https://pastebin.com/iRCAmq4r
it mentioned something about libEGL warning: DRI3: Screen seems not DRI3
capable
and basically I'm still having the same problem as before; stuttering,
audio/video stopping every few seconds.

and now when i play youtube videos with mpv, some seem to cause my x to
crash and takes me immediately back to the xenodm login screen for some
reason. not all videos, but many do. not sure if this was the case before i
made these changes or perhaps the videos i did play prior to the changes
were not as high quality as the ones i picked this time around?

while the system does use intel drm instead of modesetting which was
selected as default, none of these really fixed the issues I'm having
though. on top of that, now some of the youtube videos i'm playing via mpv
seems to be crashing X and taking me back to the xenodm login screen :(

On Sat, Nov 16, 2019 at 11:38 AM David Trudgian  wrote:

> On 11/15/19 9:51 AM, Michael H wrote:
> > *laptop: thinkpad x230, i7 processor, 8G ram, intel hd 4000 gpu*
> > *New OpenBSD user with a fresh install.*
>
> I have a ThinkPad T430 which I'm now typing this on. It's an i5-3320m
> (vs your i7-3520m) with 12GB RAM and the same HD4000 class graphics, so
> it's pretty close.
>
> > My user account is created from the install process and has "staff"
> class -
> > though i haven't increased the datasize-cur, datasize-max for staff yet.
> > Additionally, apmd has been set to -A as suggested by the faq.
>
> Am no expert, having only installed OpenBSD for the first time recently,
> but played around with the staff settings when I couldn't use a browser
> or play video at all well. Started with some values in a blog post on
> the net from someone setting up a laptop, and ended up with:
>
> :datasize-cur=8192M:\
> :datasize-max=8192M:\
> :maxproc-max=4096:\
> :maxproc-cur=1024:\
> :openfiles-max=32768:\
> :openfiles-cur=16384:\
>
> I have also set the following systcl values:
>
> # shared memory limits (browsers, etc.)
> # max shared memory pages (*4096=8GB)
> kern.shminfo.shmall=20971552
> # max shared memory segment size (2GiB)
> kern.shminfo.shmmax=2147483647
> # max shared memory identifiers
> kern.shminfo.shmmni=1024
> # max shared memory segments per process
> kern.shminfo.shmseg=1024
>
> # Other
> kern.maxproc=32768
> kern.maxfiles=131072
> kern.maxvnodes=262144
> kern.bufcachepercent=50
>
> The large files numbers here are due to using syncthing, and (I'd guess)
> probably not generally advisable. The other stuff is quite likely to be
> inadvisable or just plain wrong (due to my inexperience), but it has
> given me a responsive system when using Firefox / Chromium, playing
> video etc.
>
> > *Is this an issue with the system somehow using the modesetting driver
> > instead of the inteldrm* *driver*? if so, why is that and how should i
> best
> > remedy this problem? I thought old thinkpads are generally fully
> supported
> > by OpenBSD?
>
> Although the login.conf and sysctl settings made the most difference for
> me, I do have a smoother experience using the intel driver than the
> modesetting one. It's especially noticable when playing video in
> Firefox, and dragging the browser window around on my XFCE desktop. The
> intel driver happily plays the video smoothly as the window moves
> around. The modesetting driver wouldn't do that for me.
>
> I have the following at /etc/X11/xorg.conf.d/intel.conf
>
> Section "Device"
> Identifier "drm"
> Driver "intel"
> Option "TearFree" "true"
> EndSection
>
> Hope some of this might be useful!
>
> Cheers,
>
> Dave Trudgian
>
>
>
>
>
>


Re: urtwn(4) gets wedged periodically

2019-11-16 Thread Stefan Sperling
On Sat, Nov 16, 2019 at 05:24:37PM +0800, Kevin Lo wrote:
> Despite our USB issues, there are minor problems with the urtwn(4) for
> RTL8188C/RTL8192C:
> 
> - we don't need to enable/disable efuse access protection; it may prevent
>   incorrect mac address read from efuse.
> - disable BB/RF is not needed.

ok stsp@

> Index: sys/dev/ic/rtwn.c
> ===
> RCS file: /cvs/src/sys/dev/ic/rtwn.c,v
> retrieving revision 1.46
> diff -u -p -u -p -r1.46 rtwn.c
> --- sys/dev/ic/rtwn.c 25 Apr 2019 01:52:13 -  1.46
> +++ sys/dev/ic/rtwn.c 16 Nov 2019 09:23:07 -
> @@ -529,7 +529,9 @@ rtwn_efuse_read(struct rtwn_softc *sc, u
>   uint32_t reg;
>   int i, len;
>  
> - rtwn_write_1(sc, R92C_EFUSE_ACCESS, R92C_EFUSE_ACCESS_ON);
> + if (!(sc->chip & (RTWN_CHIP_92C | RTWN_CHIP_88C)))
> + rtwn_write_1(sc, R92C_EFUSE_ACCESS, R92C_EFUSE_ACCESS_ON);
> +
>   rtwn_efuse_switch_power(sc);
>  
>   memset(rom, 0xff, size);
> @@ -571,7 +573,8 @@ rtwn_efuse_read(struct rtwn_softc *sc, u
>   printf("\n");
>   }
>  #endif
> - rtwn_write_1(sc, R92C_EFUSE_ACCESS, R92C_EFUSE_ACCESS_OFF);
> + if (!(sc->chip & (RTWN_CHIP_92C | RTWN_CHIP_88C)))
> + rtwn_write_1(sc, R92C_EFUSE_ACCESS, R92C_EFUSE_ACCESS_OFF);
>  }
>  
>  void
> Index: sys/dev/usb/if_urtwn.c
> ===
> RCS file: /cvs/src/sys/dev/usb/if_urtwn.c,v
> retrieving revision 1.84
> diff -u -p -u -p -r1.84 if_urtwn.c
> --- sys/dev/usb/if_urtwn.c12 Sep 2019 12:55:07 -  1.84
> +++ sys/dev/usb/if_urtwn.c16 Nov 2019 09:23:07 -
> @@ -1704,21 +1704,6 @@ urtwn_r92c_power_on(struct urtwn_softc *
>   urtwn_write_2(sc, R92C_SYS_ISO_CTRL,
>   urtwn_read_2(sc, R92C_SYS_ISO_CTRL) & ~R92C_SYS_ISO_CTRL_DIOR);
>  
> - /* Initialize MAC. */
> - urtwn_write_1(sc, R92C_APSD_CTRL,
> - urtwn_read_1(sc, R92C_APSD_CTRL) & ~R92C_APSD_CTRL_OFF);
> - for (ntries = 0; ntries < 200; ntries++) {
> - if (!(urtwn_read_1(sc, R92C_APSD_CTRL) &
> - R92C_APSD_CTRL_OFF_STATUS))
> - break;
> - DELAY(5);
> - }
> - if (ntries == 200) {
> - printf("%s: timeout waiting for MAC initialization\n",
> - sc->sc_dev.dv_xname);
> - return (ETIMEDOUT);
> - }
> -
>   /* Enable MAC DMA/WMAC/SCHEDULE/SEC blocks. */
>   reg = urtwn_read_2(sc, R92C_CR);
>   reg |= R92C_CR_HCI_TXDMA_EN | R92C_CR_HCI_RXDMA_EN |
> 
> 



Re: urtwn(4) gets wedged periodically

2019-11-16 Thread Kevin Lo
On Wed, Nov 13, 2019 at 01:41:28AM -0500, Brennan Vincent wrote:
> Hello,
> 
> I have a Wi-Fi USB adapter. urtwn(4) normally works fine, but it's a bit 
> flaky... 
> 
> The issue happens both on 6.6 and on -current.
> 
> When my adapter gets into the bad state, it appears (from dmesg output) that
> the driver is scanning for access points over and over, never
> finding any. When I get into this wedged state, I don't know any way
> to bring the card back up other than unplugging it and re-inserting.
> (`ifconfig urtwn0 down && sleep 10 && sh /etc/netstart urtwn0`
> is no help).
> 
> I am attaching the relevant snippets of the dmesg output
> (Kernel built with URTWN_DEBUG and urtwn_debug level set to 3).
> 
> Another interesting thing is these "RX status=6" error messages in the
> output. Apparently, "6" corresponds to "USBD_CANCELLED"
> in sys/dev/usb/usbdi.h .
> 
> I don't think this is a hardware issue because the device is
> working fine on Ubuntu.
> 
> Please let me know if there is anything more I can do to help debug this.
> I am a beginner with OpenBSD so I'm not sure exactly what is relevant.

Despite our USB issues, there are minor problems with the urtwn(4) for
RTL8188C/RTL8192C:

- we don't need to enable/disable efuse access protection; it may prevent
  incorrect mac address read from efuse.
- disable BB/RF is not needed.

Index: sys/dev/ic/rtwn.c
===
RCS file: /cvs/src/sys/dev/ic/rtwn.c,v
retrieving revision 1.46
diff -u -p -u -p -r1.46 rtwn.c
--- sys/dev/ic/rtwn.c   25 Apr 2019 01:52:13 -  1.46
+++ sys/dev/ic/rtwn.c   16 Nov 2019 09:23:07 -
@@ -529,7 +529,9 @@ rtwn_efuse_read(struct rtwn_softc *sc, u
uint32_t reg;
int i, len;
 
-   rtwn_write_1(sc, R92C_EFUSE_ACCESS, R92C_EFUSE_ACCESS_ON);
+   if (!(sc->chip & (RTWN_CHIP_92C | RTWN_CHIP_88C)))
+   rtwn_write_1(sc, R92C_EFUSE_ACCESS, R92C_EFUSE_ACCESS_ON);
+
rtwn_efuse_switch_power(sc);
 
memset(rom, 0xff, size);
@@ -571,7 +573,8 @@ rtwn_efuse_read(struct rtwn_softc *sc, u
printf("\n");
}
 #endif
-   rtwn_write_1(sc, R92C_EFUSE_ACCESS, R92C_EFUSE_ACCESS_OFF);
+   if (!(sc->chip & (RTWN_CHIP_92C | RTWN_CHIP_88C)))
+   rtwn_write_1(sc, R92C_EFUSE_ACCESS, R92C_EFUSE_ACCESS_OFF);
 }
 
 void
Index: sys/dev/usb/if_urtwn.c
===
RCS file: /cvs/src/sys/dev/usb/if_urtwn.c,v
retrieving revision 1.84
diff -u -p -u -p -r1.84 if_urtwn.c
--- sys/dev/usb/if_urtwn.c  12 Sep 2019 12:55:07 -  1.84
+++ sys/dev/usb/if_urtwn.c  16 Nov 2019 09:23:07 -
@@ -1704,21 +1704,6 @@ urtwn_r92c_power_on(struct urtwn_softc *
urtwn_write_2(sc, R92C_SYS_ISO_CTRL,
urtwn_read_2(sc, R92C_SYS_ISO_CTRL) & ~R92C_SYS_ISO_CTRL_DIOR);
 
-   /* Initialize MAC. */
-   urtwn_write_1(sc, R92C_APSD_CTRL,
-   urtwn_read_1(sc, R92C_APSD_CTRL) & ~R92C_APSD_CTRL_OFF);
-   for (ntries = 0; ntries < 200; ntries++) {
-   if (!(urtwn_read_1(sc, R92C_APSD_CTRL) &
-   R92C_APSD_CTRL_OFF_STATUS))
-   break;
-   DELAY(5);
-   }
-   if (ntries == 200) {
-   printf("%s: timeout waiting for MAC initialization\n",
-   sc->sc_dev.dv_xname);
-   return (ETIMEDOUT);
-   }
-
/* Enable MAC DMA/WMAC/SCHEDULE/SEC blocks. */
reg = urtwn_read_2(sc, R92C_CR);
reg |= R92C_CR_HCI_TXDMA_EN | R92C_CR_HCI_RXDMA_EN |



Re: vi in ramdisk?

2019-11-16 Thread Roderick



On Sat, 16 Nov 2019, U'll Be King of the Stars wrote:


I assumed that the canonical reference for ed was K, "The Unix Programming


Reference = man page. Under /usr/share/doc/usd/ in an old BSD System
you may find Brian W. Kernighan ed Tutorial. Just google for it.


Sam looks very interesting too,


Yes. It is a perfectionated ed, not anymore line oriented, and with gui.
I am tired of emacs bloating and I am thinking on sam as an alternative,
but the background colour is annoying.


What is sos?  Is it something like open mode in Vi?


Editor in DEC 10 with TOPS-10, I think standard there.

Rod.