Re: OpenBSD 6.7-beta on arm64 with urtwn(4) gets panic: _dmamap_sync: ran off map!

2020-04-11 Thread Juan Francisco Cantero Hurtado
ed
> "binman" at mainbus0 not configured
> simplefb0 at mainbus0: 1920x1080, 32bpp
> wsdisplay0 at simplefb0 mux 1: console (std, vt100 emulation)
> wsdisplay0: screen 1-5 added (std, vt100 emulation)
> cpu1 at mainbus0 mpidr 1: ARM Cortex-A53 r0p4
> cpu1: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
> cpu1: 512KB 64b/line 16-way L2 cache
> cpu2 at mainbus0 mpidr 2: ARM Cortex-A53 r0p4
> cpu2: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
> cpu2: 512KB 64b/line 16-way L2 cache
> cpu3 at mainbus0 mpidr 3: ARM Cortex-A53 r0p4
> cpu3: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
> cpu3: 512KB 64b/line 16-way L2 cache
> manufacturer 0x024c, product 0xb703 at sdmmc1 function 1 not configured
> scsibus0 at sdmmc0: 2 targets, initiator 0
> sd0 at scsibus0 targ 1 lun 0:  removable
> sd0: 244016MB, 512 bytes/sector, 499744768 sectors
> scsibus1 at sdmmc2: 2 targets, initiator 0
> sd1 at scsibus1 targ 1 lun 0:  removable
> sd1: 14910MB, 512 bytes/sector, 30535680 sectors
> uhub4 at uhub1 port 1 configuration 1 interface 0 "Genesys Logic USB2.0 Hub" 
> rev 2.00/88.32 addr 2
> uhidev0 at uhub4 port 1 configuration 1 interface 0 "HAILUCK CO.,LTD USB 
> KEYBOARD" rev 1.10/1.00 addr 3
> uhidev0: iclass 3/1
> ukbd0 at uhidev0: 8 variable keys, 6 key codes
> wskbd0 at ukbd0: console keyboard, using wsdisplay0
> uhidev1 at uhub4 port 1 configuration 1 interface 1 "HAILUCK CO.,LTD USB 
> KEYBOARD" rev 1.10/1.00 addr 3
> uhidev1: iclass 3/0, 9 report ids
> ums0 at uhidev1 reportid 1: 5 buttons, Z and W dir
> wsmouse0 at ums0 mux 0
> uhid0 at uhidev1 reportid 2: input=1, output=0, feature=0
> uhid1 at uhidev1 reportid 3: input=3, output=0, feature=0
> uhid2 at uhidev1 reportid 5: input=0, output=0, feature=5
> uhid3 at uhidev1 reportid 6: input=0, output=0, feature=255
> uhid4 at uhidev1 reportid 9: input=1, output=0, feature=0
> uvideo0 at uhub4 port 3 configuration 1 interface 0 "Generic USB2.0 PC 
> CAMERA" rev 2.00/1.00 addr 4
> video0 at uvideo0
> vscsi0 at root
> scsibus2 at vscsi0: 256 targets
> softraid0 at root
> scsibus3 at softraid0: 256 targets
> bootfile: sd0a:/bsd
> boot device: sd0
> root on sd1a (1440dafaca0ef42a.a) swap on sd1b dump on sd1b
> urtwn0 at uhub4 port 2 configuration 1 interface 0 "Realtek 802.11n WLAN 
> Adapter" rev 2.00/2.00 addr 5
> urtwn0: MAC/BB RTL8188CUS, RF 6052 1T1R, address 80:1f:02:4b:6a:6b
> 
> -- 
> Regards,
>  Mikolaj
> 

-- 
Juan Francisco Cantero Hurtado http://juanfra.info



Re: reN networking hangs in KVM/QEMU

2019-02-09 Thread Juan Francisco Cantero Hurtado
On Fri, Feb 08, 2019 at 08:23:55PM -0500, Brad Smith wrote:
> On 2/8/2019 8:07 PM, Sijmen J. Mulder wrote:
> 
> > Hi,
> > 
> > I run OpenBSD (snapshots) in a KVM+QEMU VM on Debian 9 and use it over
> > SSH. Those SSH sessions stall almost without fail when there's a lot of
> > output.
> > 
> > Repro (or at least my set up):
> > 
> >   1. Create a KVM+QMEU VM on Linux with virt-manager. I assigned two
> >  cores and otherwise used defaults.
> >   2. Install an OpenBSD snapshot.
> >   3. In an SSH session, execute 'find /' until hang. I suspect other
> >  large network transfers may result in the same.
> > 
> > Symptoms:
> > 
> >   - SSH session stalls with no output, no echo, and no response to ^C.
> >   - New communication (SSH, ping) cannot be established: "no route to
> > host"
> >   - The serial console outputs "re0: watchdog timeout"
> >   - From the serial code, pinging the host yields "ping: sendmsg: No
> > buffer space available"
> > 
> > Workaround:
> > 
> >   'ifconfig re0 down; ifconfig re0 up' and a little patience fixes it.
> > 
> > Below, the VM's dmesg and its libvirt XML dump. After seeing the NFS
> > messages I unmounted the shares but the behaviour was the same.
> > 
> > Sijmen
> 
> Why rtl8139? It's the worst option available to KVM/QEMU. You would be much
> better off with virtio or e1000 for the NIC.

Change also the disk to 'virtio' instead of 'ide'.


-- 
Juan Francisco Cantero Hurtado http://juanfra.info



Re: Synaptics mouse issue with OpenBSD 5.1

2012-05-01 Thread Juan Francisco Cantero Hurtado
On Tue, May 01, 2012 at 10:36:30AM -0700, Joseph Olatt wrote:
> Hi,
> 
> After installing OpenBSD 5.1 this morning, I found out that my Synaptics
> clickpad mouse no longer moves. Right and Left button clicks work. In
> Fluxbox, trying to move the mouse pointer results in the workspaces
> getting changed. But, the mouse pointer does not move at all.

The change of workspace is because the scroll in your touchpad works.

> 
> Attaching a PS/2 mouse and restarting Xorg will bring back mouse
> functionality. But trying to move the mouse pointer using the Synaptics
> pad is useless.
> 
> dmesg is at: 
>   http://www.eskimo.com/~joji/openbsd5.1/dmesg.boot
> 
> Xorg log is at:
>   http://www.eskimo.com/~joji/openbsd5.1/Xorg.0.log
> 
> 
> Last night I had installed OpenBSD 5.0 and the Synaptics mouse was
> working fine. So, I don't *think* it is a hardware problem. 
> 
> Thank you.

I've had the same issue in the past with xfce and spectrwm. I didn't
report the problem because was intermitent.

Can you try the last snapshot?
http://ftp.openbsd.org/pub/OpenBSD/snapshots/i386/

If I remember correctly, I haven't had the problem from the last
month. I am not sure because I haven't used my netbook too much time the last
month.

I hope that my additional (and limited) info helps you with the problem :)

-- 
Juan Francisco Cantero Hurtado http://juanfra.info



segfault in ftp

2012-10-24 Thread Juan Francisco Cantero Hurtado
This afternoon I was downloading a tarball from a OpenBSD mirror. I
press the key "º" and after the tab key. ftp crashed with a segfault.

Steps for reproduce:
# ftp ftp.fr.openbsd.org
user and password
ascii art
ftp> cd pub/Openº<- Here press the tab key
segmentation fault (core dumped)  ftp ftp.fr.openbsd.org

It also crashes with the letter "ñ" and "á".

Tested in:
- A snapshot from yesterday. i386. root account. console/ksh without
  locales.
- A snapshot from a few days ago. amd64. user. urxvt/zsh with utf8
  locales.

I also tested the bug in a remote session with OpenBSD 4.7 and ftp works
without problems.

I've updated the code of usr.bin/ftp to 2012-10-01 and 2012-01-01 and
tried both versions. ftp also crashes.

Backtrace:
Thread 1 (process 3436):
#0  memcpy (dst0=0x9d4160, src0=Variable "src0" is not available.
) at /usr/src/lib/libc/string/bcopy.c:115
#1  0x0040432b in complete (el=Variable "el" is not available.
) at /usr/src/usr.bin/ftp/complete.c:313
#2  0x0041eb84 in el_wgets (el=0x20da64800, nread=0x7f7e3ebc) at 
read.c:612
#3  0x0041ef8d in el_gets (el=0x20da64800, nread=Variable "nread" is 
not available.
) at eln.c:78
#4  0x0040e55f in cmdscanner (top=Variable "top" is not available.
) at /usr/src/usr.bin/ftp/main.c:465
#5  0x0040eb7c in main (argc=1, argv=0x7f7e4398) at 
/usr/src/usr.bin/ftp/main.c:369

Let me know if it's necessary more info or whatever :)

Cheers.

-- 
Juan Francisco Cantero Hurtado http://juanfra.info



Re: segfault in ftp

2012-10-29 Thread Juan Francisco Cantero Hurtado
Chris Cappuccio sent me a mail saying he can't see the characters, only
a question mark.

I'm linking each character to their wikipedia page, so you can
copy-paste the character.

On Thu, Oct 25, 2012 at 05:07:34AM +0200, Juan Francisco Cantero Hurtado wrote:
> This afternoon I was downloading a tarball from a OpenBSD mirror. I
> press the key "?" and after the tab key. ftp crashed with a segfault.
https://en.wikipedia.org/wiki/%C2%BA
> 
> Steps for reproduce:
> # ftp ftp.fr.openbsd.org
> user and password
> ascii art
> ftp> cd pub/Open?<- Here press the tab key
https://en.wikipedia.org/wiki/%C2%BA
> segmentation fault (core dumped)  ftp ftp.fr.openbsd.org
> 
> It also crashes with the letter "?" and "?".
https://en.wikipedia.org/wiki/%C3%81
https://en.wikipedia.org/wiki/%C3%91
> 
> Tested in:
> - A snapshot from yesterday. i386. root account. console/ksh without
>   locales.
> - A snapshot from a few days ago. amd64. user. urxvt/zsh with utf8
>   locales.
> 
> I also tested the bug in a remote session with OpenBSD 4.7 and ftp works
> without problems.
> 
> I've updated the code of usr.bin/ftp to 2012-10-01 and 2012-01-01 and
> tried both versions. ftp also crashes.
> 
> Backtrace:
> Thread 1 (process 3436):
> #0  memcpy (dst0=0x9d4160, src0=Variable "src0" is not available.
> ) at /usr/src/lib/libc/string/bcopy.c:115
> #1  0x0040432b in complete (el=Variable "el" is not available.
> ) at /usr/src/usr.bin/ftp/complete.c:313
> #2  0x0041eb84 in el_wgets (el=0x20da64800, nread=0x7f7e3ebc) at 
> read.c:612
> #3  0x0041ef8d in el_gets (el=0x20da64800, nread=Variable "nread" is 
> not available.
> ) at eln.c:78
> #4  0x0040e55f in cmdscanner (top=Variable "top" is not available.
> ) at /usr/src/usr.bin/ftp/main.c:465
> #5  0x0040eb7c in main (argc=1, argv=0x7f7e4398) at 
> /usr/src/usr.bin/ftp/main.c:369
> 
> Let me know if it's necessary more info or whatever :)
> 
> Cheers.
> 

-- 
Juan Francisco Cantero Hurtado http://juanfra.info



Re: segfault in ftp

2012-10-30 Thread Juan Francisco Cantero Hurtado
On Tue, Oct 30, 2012 at 09:31:58AM +0100, Otto Moerbeek wrote:
> On Mon, Oct 29, 2012 at 06:43:13PM +0100, Juan Francisco Cantero Hurtado 
> wrote:
> 
> > Chris Cappuccio sent me a mail saying he can't see the characters, only
> > a question mark.
> > 
> > I'm linking each character to their wikipedia page, so you can
> > copy-paste the character.
> > 
> > On Thu, Oct 25, 2012 at 05:07:34AM +0200, Juan Francisco Cantero Hurtado 
> > wrote:
> > > This afternoon I was downloading a tarball from a OpenBSD mirror. I
> > > press the key "?" and after the tab key. ftp crashed with a segfault.
> 
> Please also include your environment settings. It is likely locale
> plays a role here.
> 
> At least env | grep LC
> 

I've tried the bug in amd64 without locales and also with
LC_TIME="es_ES.ISO8859-1" LC_CTYPE="en_US.UTF-8".

The i386 system was a clean installation in a virtual machine.

> 
> > https://en.wikipedia.org/wiki/%C2%BA
> > > 
> > > Steps for reproduce:
> > > # ftp ftp.fr.openbsd.org
> > > user and password
> > > ascii art
> > > ftp> cd pub/Open?<- Here press the tab key
> > https://en.wikipedia.org/wiki/%C2%BA
> > > segmentation fault (core dumped)  ftp ftp.fr.openbsd.org
> > > 
> > > It also crashes with the letter "?" and "?".
> > https://en.wikipedia.org/wiki/%C3%81
> > https://en.wikipedia.org/wiki/%C3%91
> > > 
> > > Tested in:
> > > - A snapshot from yesterday. i386. root account. console/ksh without
> > >   locales.
> > > - A snapshot from a few days ago. amd64. user. urxvt/zsh with utf8
> > >   locales.
> > > 
> > > I also tested the bug in a remote session with OpenBSD 4.7 and ftp works
> > > without problems.
> > > 
> > > I've updated the code of usr.bin/ftp to 2012-10-01 and 2012-01-01 and
> > > tried both versions. ftp also crashes.
> > > 
> > > Backtrace:
> > > Thread 1 (process 3436):
> > > #0  memcpy (dst0=0x9d4160, src0=Variable "src0" is not available.
> > > ) at /usr/src/lib/libc/string/bcopy.c:115
> > > #1  0x0040432b in complete (el=Variable "el" is not available.
> > > ) at /usr/src/usr.bin/ftp/complete.c:313
> > > #2  0x0041eb84 in el_wgets (el=0x20da64800, nread=0x7f7e3ebc) 
> > > at read.c:612
> > > #3  0x0041ef8d in el_gets (el=0x20da64800, nread=Variable "nread" 
> > > is not available.
> > > ) at eln.c:78
> > > #4  0x0040e55f in cmdscanner (top=Variable "top" is not available.
> > > ) at /usr/src/usr.bin/ftp/main.c:465
> > > #5  0x0040eb7c in main (argc=1, argv=0x7f7e4398) at 
> > > /usr/src/usr.bin/ftp/main.c:369
> > > 
> > > Let me know if it's necessary more info or whatever :)
> > > 
> > > Cheers.
> > > 
> > 

-- 
Juan Francisco Cantero Hurtado http://juanfra.info



Re: segfault in ftp

2012-10-30 Thread Juan Francisco Cantero Hurtado
On Tue, Oct 30, 2012 at 11:56:18PM +, Nicholas Marriott wrote:
> Hi
> 
> The buffer isn't zero-terminated, it's the result of calling wctomb to
> convert the internal wchar_t* that libedit has into a char*.
> 
> libedit works out the offset in el_line with ct_enc_width which rather
> foolishly makes the assumption that wctomb will convert to UTF-8, but
> ftp doesn't call setlocale so it just leaves it as ASCII.
> 
> Try this:
> 
> Index: main.c
> ===
> RCS file: /cvs/src/usr.bin/ftp/main.c,v
> retrieving revision 1.85
> diff -u -p -r1.85 main.c
> --- main.c26 Aug 2012 02:16:02 -  1.85
> +++ main.c30 Oct 2012 23:52:34 -
> @@ -67,6 +67,7 @@
>  
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
>  #include 
> @@ -90,6 +91,8 @@ main(volatile int argc, char *argv[])
>   char *outfile = NULL;
>   const char *errstr;
>   int dumb_terminal = 0;
> +
> + setlocale(LC_CTYPE, "");
>  
>   ftpport = "ftp";
>   httpport = "http";
> 

Your patch fix the bug. Thanks a lot!

> 
> On Tue, Oct 30, 2012 at 10:31:16PM +0100, Otto Moerbeek wrote:
> > On Tue, Oct 30, 2012 at 10:17:12PM +0100, Otto Moerbeek wrote:
> > 
> > > On Tue, Oct 30, 2012 at 08:59:27PM +0100, Juan Francisco Cantero Hurtado 
> > > wrote:
> > > 
> > > > On Tue, Oct 30, 2012 at 09:31:58AM +0100, Otto Moerbeek wrote:
> > > > > On Mon, Oct 29, 2012 at 06:43:13PM +0100, Juan Francisco Cantero 
> > > > > Hurtado wrote:
> > > > > 
> > > > > > Chris Cappuccio sent me a mail saying he can't see the characters, 
> > > > > > only
> > > > > > a question mark.
> > > > > > 
> > > > > > I'm linking each character to their wikipedia page, so you can
> > > > > > copy-paste the character.
> > > > > > 
> > > > > > On Thu, Oct 25, 2012 at 05:07:34AM +0200, Juan Francisco Cantero 
> > > > > > Hurtado wrote:
> > > > > > > This afternoon I was downloading a tarball from a OpenBSD mirror. 
> > > > > > > I
> > > > > > > press the key "?" and after the tab key. ftp crashed with a 
> > > > > > > segfault.
> > > > > 
> > > > > Please also include your environment settings. It is likely locale
> > > > > plays a role here.
> > > > > 
> > > > > At least env | grep LC
> > > > > 
> > > > 
> > > > I've tried the bug in amd64 without locales and also with
> > > > LC_TIME="es_ES.ISO8859-1" LC_CTYPE="en_US.UTF-8".
> > > > 
> > > > The i386 system was a clean installation in a virtual machine.
> > > 
> > > I can now reproduce using a terminal that accepts more than just low 
> > > ascii.
> > > 
> > > What I see is that when complete() is called the cursor position in
> > > the EditLine struct is not what it is supposed to be, it points a
> > > couple of bytes beyond the terminating NUL while it is supposed to
> > > point to the NUL. That causes confusing in the scanner, getting the
> > > argument list count wrong.
> > 
> > Ehh, the buffer is not NUL terminated, but observation still holds:
> > the cursor position is a couple of bytes further than it
> > should be.
> > 
> > > 
> > > The root of the problem seems to be inside the editline lib.
> > > 
> > > Cc:ing nicm@, maybe he has a clue
> > > 
> > >   -Otto
> > >   
> > > 
> > > > 
> > > > > 
> > > > > > https://en.wikipedia.org/wiki/%C2%BA
> > > > > > > 
> > > > > > > Steps for reproduce:
> > > > > > > # ftp ftp.fr.openbsd.org
> > > > > > > user and password
> > > > > > > ascii art
> > > > > > > ftp> cd pub/Open?<- Here press the tab key
> > > > > > https://en.wikipedia.org/wiki/%C2%BA
> > > > > > > segmentation fault (core dumped)  ftp ftp.fr.openbsd.org
> > > > > > > 
> > > > > > > It also crashes with the letter "?" and "?".
> > > > > > https://en.wikipedia.org/wiki/%C3%81
> > > > > > https://en.wikipedia.org/wiki/%C3%91
> > > >

Re: segfault in ftp

2012-10-30 Thread Juan Francisco Cantero Hurtado
On Wed, Oct 31, 2012 at 12:13:56AM +, Nicholas Marriott wrote:
> That is:
> 
> - libedit has a wchar_t* buffer (el->el_line.buffer) and el_line calls
>   ct_encode_string to convert it to a char*.
> 
> - ct_encode_string calls wctomb which it expects to make UTF-8 but in
>   fact because setlocale has not been called it outputs ASCII.
> 
> - el_line then uses ct_enc_width which assumes UTF-8 and returns 2. So
>   the offset is adjusted by 2 even though only 1 byte was filled in.
> 
> - ftp obviously isn't happy about having a position after a \0, so it
>   goes boom.
> 
> The setlocale() change below will only fix the problem if LC_CTYPE or
> LC_ALL is set to UTF-8. ftp still cores if pasting UTF-8 in C locale.
> 
> I think the right fix is for libedit to use the return value of wctomb
> to adjust the offset rather than assuming UTF-8 and working out the
> width itself.
> 
> Perhaps something like this (very lightly tested):
> 
> Index: chartype.c
> ===
> RCS file: /cvs/src/lib/libedit/chartype.c,v
> retrieving revision 1.4
> diff -u -p -r1.4 chartype.c
> --- chartype.c17 Nov 2011 20:14:24 -  1.4
> +++ chartype.c31 Oct 2012 00:13:12 -
> @@ -44,6 +44,8 @@
>  #define CT_BUFSIZ 1024
>  
>  #ifdef WIDECHAR
> +protected ssize_t ct_encode_char1(char *, size_t, Char);
> +
>  protected void
>  ct_conv_buff_resize(ct_buffer_t *conv, size_t mincsize, size_t minwsize)
>  {
> @@ -178,27 +180,25 @@ ct_decode_argv(int argc, const char *arg
>  protected size_t
>  ct_enc_width(Char c)
>  {
> - /* UTF-8 encoding specific values */
> - if (c < 0x80)
> - return 1;
> - else if (c < 0x0800)
> - return 2;
> - else if (c < 0x1)
> - return 3;
> - else if (c < 0x11)
> - return 4;
> - else
> - return 0; /* not a valid codepoint */
> + char s[MB_CUR_MAX];
> +
> + return ct_encode_char1(s, sizeof s, c);
>  }
>  
>  protected ssize_t
>  ct_encode_char(char *dst, size_t len, Char c)
>  {
> - ssize_t l = 0;
>   if (len < ct_enc_width(c))
>   return -1;
> - l = ct_wctomb(dst, c);
> + return ct_encode_char1(dst, len, c);
> +}
>  
> +protected ssize_t
> +ct_encode_char1(char *dst, size_t len, Char c)
> +{
> + ssize_t l = 0;
> +
> + l = ct_wctomb(dst, c);
>   if (l < 0) {
>   ct_wctomb_reset;
>   l = 0;
> 

With this patch (and without the patch for ftp), the behavior of ftp is
a little weird.

> cd pub/Open
 ^

Here I write https://en.wikipedia.org/wiki/%C2%BA and press tab. I can
see the character. I press backspace and the completion doesn't work. I
press backspace again and tab. ftp completes to "cd pub/OpeBSD".


> 
> On Tue, Oct 30, 2012 at 11:56:18PM +, Nicholas Marriott wrote:
> > Hi
> > 
> > The buffer isn't zero-terminated, it's the result of calling wctomb to
> > convert the internal wchar_t* that libedit has into a char*.
> > 
> > libedit works out the offset in el_line with ct_enc_width which rather
> > foolishly makes the assumption that wctomb will convert to UTF-8, but
> > ftp doesn't call setlocale so it just leaves it as ASCII.
> > 
> > Try this:
> > 
> > Index: main.c
> > ===
> > RCS file: /cvs/src/usr.bin/ftp/main.c,v
> > retrieving revision 1.85
> > diff -u -p -r1.85 main.c
> > --- main.c  26 Aug 2012 02:16:02 -  1.85
> > +++ main.c  30 Oct 2012 23:52:34 -
> > @@ -67,6 +67,7 @@
> >  
> >  #include 
> >  #include 
> > +#include 
> >  #include 
> >  #include 
> >  #include 
> > @@ -90,6 +91,8 @@ main(volatile int argc, char *argv[])
> > char *outfile = NULL;
> > const char *errstr;
> > int dumb_terminal = 0;
> > +
> > +   setlocale(LC_CTYPE, "");
> >  
> > ftpport = "ftp";
> > httpport = "http";
> > 
> > 
> > 
> > 
> > 
> > On Tue, Oct 30, 2012 at 10:31:16PM +0100, Otto Moerbeek wrote:
> > > On Tue, Oct 30, 2012 at 10:17:12PM +0100, Otto Moerbeek wrote:
> > > 
> > > > On Tue, Oct 30, 2012 at 08:59:27PM +0100, Juan Francisco Cantero 
> > > > Hurtado wrote:
> > > > 
> > > > > On Tue, Oct 30, 2012 at 09:31:58AM +0100, Otto Moerbeek wrote:
> > > > > > On Mon, Oct 29, 2012 at 06:43:1

Network doesn't work in upgrades with wol enabled

2012-12-29 Thread Juan Francisco Cantero Hurtado
The "hostname.re0" file of my test machine:
inet 192.168.1.3 255.255.255.0
wol

The network and wol work always both without problems. The only
exception are the upgrades.

Copy-paste of the output of upgrade, look "invalid network configuration
file" and "temporary failure in name resolution":

Welcome to the OpenBSD/i386 5.2 installation program.
(I)nstall, (U)pgrade or (S)hell? u
At any prompt except password prompts you can escape to a shell by
typing '!'. Default answers are shown in []'s and are selected by
pressing RETURN.  You can exit this program at any time by pressing
Control-C, but this can leave your system in an inconsistent state.

Terminal type? [vt220] 
Available disks are: wd0.
Which disk is the root disk? ('?' for details) [wd0] 
Root filesystem? [wd0a] 
Checking root filesystem (fsck -fp /dev/wd0a)...OK.
Mounting root filesystem (mount -o ro /dev/wd0a /mnt)...OK.
/mnt/etc/hostname.re0: invalid network configuration file
Force checking of clean non-root filesystems? [no] 
fsck -p b78f9e66c14c45dc.a...OK.
/dev/wd0a on /mnt type ffs (rw, local, noatime)

Let's upgrade the sets!
Location of sets? (disk ftp http or 'done') [http] 
HTTP/FTP proxy URL? (e.g. 'http://proxy:8080', or 'none') [none] 
(Was not able to get ftplist from ftp.openbsd.org, but that is OK)
Server? (hostname or 'done') ftp.fr.openbsd.org
Server directory? [pub/OpenBSD/snapshots/i386] 
ftp: temporary failure in name resolution: ftp.fr.openbsd.org
Looked at http://ftp.fr.openbsd.org/pub/OpenBSD/snapshots/i386
and found no OpenBSD/i386 5.2 sets.  The set names looked for were:
bsd man52.tgz   xserv52.tgz
bsd.rd  game52.tgz  site52.tgz
bsd.mp  xbase52.tgz site52-tests-i386.tgz
base52.tgz  xshare52.tgz
comp52.tgz  xfont52.tgz

Location of sets? (disk ftp http or 'done') [http]

# ifconfig re0
re0: flags=8843 mtu 1500
lladdr 00:1c:c0:ce:12:89
media: Ethernet autoselect (100baseTX full-duplex,rxpause,txpause)
status: active
inet 192.168.1.3 netmask 0xff00 broadcast 192.168.1.255
inet6 fe80::21c:c0ff:fece:1289%re0 prefixlen 64 scopeid 0x1
# cat /etc/resolv.conf
lookup file bind
nameserver 109.69.8.34
nameserver 82.233.70.114
# route show
Routing tables

Internet:
DestinationGatewayFlags   Refs  Use   Mtu  Prio Iface
localhost  localhost  UH 00 33196 4 lo0
192.168.1/24   link#1 UC 00 - 4 re0

Internet6:
DestinationGatewayFlags   Refs  Use   Mtu  Prio Iface
localhost  localhost  UH 00 33196 4 lo0
fe80::%re0/64  link#1 UC 00 - 4 re0
fe80::21c:c0ff:fec 00:1c:c0:ce:12:89  UHL00 - 4 lo0
fe80::%lo0/64  fe80::1%lo0U  00 - 4 lo0
fe80::1%lo0link#2 UHL00 - 4 lo0
ff01::%re0/32  link#1 UC 00 - 4 re0
ff01::%lo0/32  fe80::1%lo0UC 00 - 4 lo0
ff02::%re0/32  link#1 UC 00 - 4 re0
ff02::%lo0/32  fe80::1%lo0UC 00 - 4 lo0


Fortunately, the installer is just a shell script so I've been looking
for the culprit. enable_network() doesn't ignore the line with the text "wol"
and exits before of to finish the setup of the routes.

Here is a patch:
http://juanfra.info/bugs-y-listas/openbsd-upgrade-wol-201212/install.sub.patch

Anyway, I think other options of ifconfig also can cause problems. If I
have some of free time the next month, I'll send other patch for to
enable more options.

Cheers!

-- 
Juan Francisco Cantero Hurtado http://juanfra.info



Re: uvm_fault(0xfffffe801a9eaa98, 0x0, 0, 2) -> e

2012-12-29 Thread Juan Francisco Cantero Hurtado
On Sun, Dec 30, 2012 at 03:50:42AM +0100, Mike Belopuhov wrote:
> On 29 December 2012 16:33, Bill Allaire  wrote:
> > Hi,
> >
> > I run OpenBSD 5.2 on a VPS @ rootbsd.net. Unfortunately I only have VNC 
> > access to the console so I had to take screenshots of the output from 
> > commands at the ddb> prompt.
> >
> > http://bogoflop.com/uvm_fault/index.html
> >
> > On that above page you'll find: trace, show panic and ps output.
> >
> 
> it's not very helpful to point us to the website that is down...

https://devio.us/~juanfra684/bugs/bug-uvm-vps-201212.tar

I also can't access to the content from my house but it's accessible from
two of my shell accounts.

-- 
Juan Francisco Cantero Hurtado http://juanfra.info



Re: Network doesn't work in upgrades with wol enabled

2013-01-05 Thread Juan Francisco Cantero Hurtado
On Sun, Dec 30, 2012 at 04:25:43AM +0100, Juan Francisco Cantero Hurtado wrote:
> The "hostname.re0" file of my test machine:
> inet 192.168.1.3 255.255.255.0
> wol
> 
> The network and wol work always both without problems. The only
> exception are the upgrades.
> 
> Copy-paste of the output of upgrade, look "invalid network configuration
> file" and "temporary failure in name resolution":
> 
> Welcome to the OpenBSD/i386 5.2 installation program.
> (I)nstall, (U)pgrade or (S)hell? u
> At any prompt except password prompts you can escape to a shell by
> typing '!'. Default answers are shown in []'s and are selected by
> pressing RETURN.  You can exit this program at any time by pressing
> Control-C, but this can leave your system in an inconsistent state.
> 
> Terminal type? [vt220] 
> Available disks are: wd0.
> Which disk is the root disk? ('?' for details) [wd0] 
> Root filesystem? [wd0a] 
> Checking root filesystem (fsck -fp /dev/wd0a)...OK.
> Mounting root filesystem (mount -o ro /dev/wd0a /mnt)...OK.
> /mnt/etc/hostname.re0: invalid network configuration file
> Force checking of clean non-root filesystems? [no] 
> fsck -p b78f9e66c14c45dc.a...OK.
> /dev/wd0a on /mnt type ffs (rw, local, noatime)
> 
> Let's upgrade the sets!
> Location of sets? (disk ftp http or 'done') [http] 
> HTTP/FTP proxy URL? (e.g. 'http://proxy:8080', or 'none') [none] 
> (Was not able to get ftplist from ftp.openbsd.org, but that is OK)
> Server? (hostname or 'done') ftp.fr.openbsd.org
> Server directory? [pub/OpenBSD/snapshots/i386] 
> ftp: temporary failure in name resolution: ftp.fr.openbsd.org
> Looked at http://ftp.fr.openbsd.org/pub/OpenBSD/snapshots/i386
> and found no OpenBSD/i386 5.2 sets.  The set names looked for were:
> bsd man52.tgz   xserv52.tgz
> bsd.rd  game52.tgz  site52.tgz
> bsd.mp  xbase52.tgz site52-tests-i386.tgz
> base52.tgz  xshare52.tgz
> comp52.tgz  xfont52.tgz
> 
> Location of sets? (disk ftp http or 'done') [http]
> 
> # ifconfig re0
> re0: flags=8843 mtu 1500
> lladdr 00:1c:c0:ce:12:89
> media: Ethernet autoselect (100baseTX full-duplex,rxpause,txpause)
> status: active
> inet 192.168.1.3 netmask 0xff00 broadcast 192.168.1.255
> inet6 fe80::21c:c0ff:fece:1289%re0 prefixlen 64 scopeid 0x1
> # cat /etc/resolv.conf
> lookup file bind
> nameserver 109.69.8.34
> nameserver 82.233.70.114
> # route show
> Routing tables
> 
> Internet:
> DestinationGatewayFlags   Refs  Use   Mtu  Prio Iface
> localhost  localhost  UH 00 33196 4 lo0
> 192.168.1/24   link#1 UC 00 - 4 re0
> 
> Internet6:
> DestinationGatewayFlags   Refs  Use   Mtu  Prio Iface
> localhost  localhost  UH 00 33196 4 lo0
> fe80::%re0/64  link#1 UC 00 - 4 re0
> fe80::21c:c0ff:fec 00:1c:c0:ce:12:89  UHL00 - 4 lo0
> fe80::%lo0/64  fe80::1%lo0U  00 - 4 lo0
> fe80::1%lo0link#2 UHL00 - 4 lo0
> ff01::%re0/32  link#1 UC 00 - 4 re0
> ff01::%lo0/32  fe80::1%lo0UC 00 - 4 lo0
> ff02::%re0/32  link#1 UC 00 - 4 re0
> ff02::%lo0/32  fe80::1%lo0UC 00 - 4 lo0
> 
> 
> Fortunately, the installer is just a shell script so I've been looking
> for the culprit. enable_network() doesn't ignore the line with the text "wol"
> and exits before of to finish the setup of the routes.
> 
> Here is a patch:
> http://juanfra.info/bugs-y-listas/openbsd-upgrade-wol-201212/install.sub.patch
> 
> Anyway, I think other options of ifconfig also can cause problems. If I
> have some of free time the next month, I'll send other patch for to
> enable more options.
> 
> Cheers!
> 

The last commit from krw@ in install.sub fixes my problem. Thanks a lot!.

-- 
Juan Francisco Cantero Hurtado http://juanfra.info



Re: ksh bug

2013-01-24 Thread Juan Francisco Cantero Hurtado
On Thu, Jan 24, 2013 at 12:14:28PM +0200, ja...@cieti.lv wrote:
> Hello!
> 
> If I type r r in console or xterm, like:
> 
> $ r r
> 
> I get ksh.core. It works on i386 5.2 and amd64 current.

Read the man page of ksh. You're running a infinite loop.

-- 
Juan Francisco Cantero Hurtado http://juanfra.info



Re: fread() on unbuffered FILE doesn't set feof flag

2018-12-13 Thread Juan Francisco Cantero Hurtado
On Thu, Dec 13, 2018 at 11:01:10AM -0700, Todd C. Miller wrote:
> Here's a diff that fakes up a FILE like we do in other parts of
> stdio for unbuffered I/O.  This lets us call __srefill() normally.
> If __srefill() returns an error, copy the flags back to the real
> FILE *.

Your patch fixes the mercurial crashes. Many thanks.


> 
>  - todd
> 
> Index: lib/libc/stdio/fread.c
> ===
> RCS file: /cvs/src/lib/libc/stdio/fread.c,v
> retrieving revision 1.15
> diff -u -p -u -r1.15 fread.c
> --- lib/libc/stdio/fread.c21 Sep 2016 04:38:56 -  1.15
> +++ lib/libc/stdio/fread.c13 Dec 2018 17:24:34 -
> @@ -69,18 +69,39 @@ fread(void *buf, size_t size, size_t cou
>   total = resid;
>   p = buf;
>  
> + /*
> +  * If we're unbuffered we know that the buffer in fp is empty so
> +  * we can read directly into buf.  This is much faster than a
> +  * series of one byte reads into fp->_nbuf.
> +  */
>   if ((fp->_flags & __SNBF) != 0) {
> - /*
> -  * We know if we're unbuffered that our buffer is empty, so
> -  * we can just read directly. This is much faster than the
> -  * loop below which will perform a series of one byte reads.
> -  */
> - while (resid > 0 && (r = (*fp->_read)(fp->_cookie, p, resid)) > 
> 0) {
> - p += r;
> - resid -= r;
> + FILE fake;
> + struct __sfileext fakeext;
> +
> + _FILEEXT_SETUP(&fake, &fakeext);
> + /* copy the important variables */
> + fake._flags = fp->_flags;
> + fake._file = fp->_file;
> + fake._cookie = fp->_cookie;
> + fake._read = fp->_read;
> +
> + /* set up the buffer */
> + fake._bf._base = buf;
> + fake._bf._size = total;
> + fake._lbfsize = 0;  /* not line buffered */
> +
> + while (resid > 0) {
> + if (__srefill(&fake)) {
> + /* no more input: return partial result */
> + count = (total - resid) / size;
> + fp->_flags |= (fake._flags & (__SERR|__SEOF));
> + break;
> + }
> + fake._p += fake._r;
> +     resid -= fake._r;
>   }
>   FUNLOCKFILE(fp);
> - return ((total - resid) / size);
> + return (count);
>   }
>  
>   while (resid > (r = fp->_r)) {
> 

-- 
Juan Francisco Cantero Hurtado http://juanfra.info



Re: sshd high cpu : system freeze

2019-01-20 Thread Juan Francisco Cantero Hurtado
On Sun, Jan 20, 2019 at 07:24:44PM +0100, Karel Gardas wrote:
> 
> Based on my experience, softdep may be very fragile on the fast system with 
> slow drive. I guess what you see may be softdep own issue.

The panic is in softdep but he had also a crash without softdep.

Thuban, can you run fsck on the partitions of the USB drive using amd64
and try to crash the system without softdep?. Run the same commands on
the ddb prompt as your previous mail.

> 
> On Sun, 20 Jan 2019 11:49:32 +0100
> Thuban  wrote:
> 
> > I've got some more.
> > After mounting the disk with "softdep" option, I saw this message on the
> > console a short while before the crash : 
> > 
> > ehci_sync_hc: tsleep() = 35
> > ehci_sync_hc: tsleep() = 35
> > ehci_sync_hc: tsleep() = 35
> > ehci_sync_hc: tsleep() = 35
> > /var: got error 5 while accessing filesystem
> > panic: softdep_deallocate_dependencies: unrecovered I/O error
> > Stopped at  panic+0x154:TIDPIDUID PRFLAGS 
> > PFLAGS  C
> > PU  COMMAND
> >  311215  63029 730x100010  01  syslogd
> >  390837  99391  0 0x panic+0x150
> > panic() at brelse+0xc4
> > brelse() at sd_buf_done+0x10c
> > sd_buf_done() at scsi_done+0x34
> > scsi_done() at usb_transfer_complete+0x238
> > usb_transfer_complete() at ehci_abort_xfer+0x258
> > ehci_abort_xfer() at ehci_timeout_task+0x34
> > 
> > 
> > Then, the ddb prompt showed up, but I wasn't sure what to do next.
> > Please, tell me how to give you more relevant information to solve this
> > issue.
> > 
> > Regards.
> > 
> 
> 

-- 
Juan Francisco Cantero Hurtado http://juanfra.info



Re: sshd high cpu : system freeze

2019-01-23 Thread Juan Francisco Cantero Hurtado
On Wed, Jan 23, 2019 at 07:47:16PM +0100, Thuban wrote:
> * Juan Francisco Cantero Hurtado  le [20-01-2019 23:39:45 
> +0100]:
> > On Sun, Jan 20, 2019 at 07:24:44PM +0100, Karel Gardas wrote:
> > > 
> > > Based on my experience, softdep may be very fragile on the fast system 
> > > with slow drive. I guess what you see may be softdep own issue.
> > 
> > The panic is in softdep but he had also a crash without softdep.
> > 
> 
> True.
> Without softdep, I can't get access to the console (or didn't manage
> to).
> 
> I ran fsck -yf on the disk via on an amd64 machine as suggested.
> (Though, crash happens on arm64).

I suggested amd64 because the arch has more stable and widely tested
drivers.

> Everything seems ok.
> 
>   moria# fsck -fy /dev/sd2a
>   ** /dev/rsd2a
>   ** File system is already clean
>   ** Last Mounted on /vol/Samsung SSD 850-p1
>   ** Phase 1 - Check Blocks and Sizes
>   ** Phase 2 - Check Pathnames
>   ** Phase 3 - Check Connectivity
>   ** Phase 4 - Check Reference Counts
>   ** Phase 5 - Check Cyl groups
>   20863 files, 1492748 used, 37517771 free (739 frags, 4689629 blocks, 
> 0.0% fragme
>   moria# fsck -fy /dev/sd2d 
>   ** /dev/rsd2d
>   ** File system is already clean
>   ** Last Mounted on /vol/Samsung SSD 850-p2
>   ** Phase 1 - Check Blocks and Sizes
>   ** Phase 2 - Check Pathnames
>   ** Phase 3 - Check Connectivity
>   ** Phase 4 - Check Reference Counts
>   ** Phase 5 - Check Cyl groups
>   4 files, 4 used, 1034203 free (35 frags, 129271 blocks, 0.0% 
> fragmentation)
>   moria# fsck -fy /dev/sd2e 
>   ** /dev/rsd2e
>   ** File system is already clean
>   ** Last Mounted on /vol/Samsung SSD 850-p3
>   ** Phase 1 - Check Blocks and Sizes
>   ** Phase 2 - Check Pathnames
>   ** Phase 3 - Check Connectivity
>   ** Phase 4 - Check Reference Counts
>   ** Phase 5 - Check Cyl groups
>   26838 files, 2769562 used, 98993405 free (381 frags, 12374128 blocks, 
> 0.0% fragmentation)
> 
> 
> I had to crash the server at least 5 times to get an access to the
> console. Else, all I was able to do was a hard reboot.
> 
> Here the ddb output after a new crash.
> 
>   /var: got error 5 while accessing filesystem
>   panic: softdep_deallocate_dependencies: unrecovered I/O error

"unrecovered I/O error" sometimes happens due to a bad sector. Use amd64
to fill the SSD with zeroes using dd and use also nick's suggestion from
this thread:

http://openbsd-archive.7691.n7.nabble.com/ahci-error-during-install-of-6-4-td357865.html

The dmesg will show if you have bad sectors or not.



>   Stopped at  panic+0x154:TIDPIDUID PRFLAGS 
> PFLAGS  C
>   PU  COMMAND
>161990  94125  0 0x14000  0x2000  zerothread
>   *365345   9753  0c+0x150
>   panic() at brelse+0xc4
>   brelse() at sd_buf_done+0x124

You're mounting the partitions from fstab, at the start of the init
process. The reason why you only can boot with softdep is because
softdep defers the write of the problematic blocks. sd_buf_done() is
part of softdep and brelse() needs to write to the disk.

If you need to save data from the drives, remove the partitions from
fstab and mount both manually with "ro" as mount option. If you're
lucky, the copy will not fail with ro.


>   sd_buf_done() at scsi_done+0x34
>   scsi_done() at usb_transfer_complete+0x238
>   usb_transfer_complete() at ehci_abort_xfer+0x258
>   ehci_abort_xfer() at ehci_timeout_task+0x34
>   https://www.openbsd.
>   ddb{1}> 
> 
>   ddb{1}> trace
>   db_enter() at panic+0x150
>   panic() at brelse+0xc4
>   brelse() at sd_buf_done+0x124
>   sd_buf_done() at scsi_done+0x34
>   scsi_done() at usb_transfer_complete+0x238
>   usb_transfer_complete() at ehci_abort_xfer+0x258
>   ehci_abort_xfer() at ehci_timeout_task+0x34
>   ehci_timeout_task() at usb_abort_task_thread+0xcc
>   usb_abort_task_thread() at proc_trampoline+0x10
> 
>   ddb{1}> show panic
>   softdep_deallocate_dependencies: unrecovered I/O error
> 
> 
>   ddb{1}> show uvm
>   Current UVM status:
> pagesize=4096 (0x1000), pagemask=0xfff, pageshift=12
> 988985 VM pages: 110183 active, 132343 inactive, 0 wired, 438054 free 
> (52331 z
>   ero)
> min  10% (25) anon, 10% (25) vnode, 5% (12) vtext
> freemin=32966, free-target=43954, inactive-target=89584, 
> wired-max=329661
> faults=67079988, trap53705(153706), anget

Re: mp deadlock on 6.2 running on kvm

2017-12-09 Thread Juan Francisco Cantero Hurtado
On Thu, Dec 07, 2017 at 02:27:29PM +0100, Landry Breuil wrote:
> On Thu, Dec 07, 2017 at 11:52:46AM +0100, Martin Pieuchot wrote:
> > On 07/12/17(Thu) 08:34, Landry Breuil wrote:
> > > Hi,
> > > 
> > > i've been having kvm VMs running 6.2 hardlocking/deadlocking since a
> > > while, all those running on proxmox 5.1 using linux 4.13.8 & qemu-kvm
> > > 2.9.1. There were hardlocks upon reboot which were 'solved' by disabling
> > > x2apic emulation in kvm (args: -cpu=kvm64,-x2apic) or giving the host
> > > cpu flags to the vm (args: -cpu host) but there still remains deadlocks
> > > during normal operation.
> > > 
> > > I'm now running a kernel with MP_LOCKDEBUG, so i'm collecting traces in
> > > the vain hope that it might help someone interested in locking issues.
> > > Here's the latest one:
> > 
> > Let me add that when you had x2apic enabled the kernel 'froze' inside
> > x2apic_readreg, trace below:
> > 
> >   ddb{0}> tr
> >   x2apic_readreg(10) at x2apic_readreg+0xf
> >   lapic_delay(800022136900) at lapic_delay+0x5c
> >   rtcput(800022136960) at rtcput+0x65
> >   resettodr() at resettodr+0x1d6
> >   perform_resettodr(81769b29) at perform_resettodr+0x9
> >   taskq_thread(0) at taskq_thread+0x67
> >   end trace frame: 0x0, count: -6
> > 
> > What you're seeing with a MP_LOCKDEBUG kernel is just a symptom.  A CPU
> > enters DDB because another one is 'frozen' while holding the
> > KERNEL_LOCK().  What's interesting is that in both case the frozen CPU
> > is trying to execute apic related code:
> >   - x2apic_readreg
> >   - lapic_delay
> > 
> > I believe this issue should be reported to KVM developers as well.
> 
> *very* interestingly, i had a new lock, running bsd.sp.. So i think that
> rules out openbsd mp.
> 
> ddb> tr
> i82489_readreg(0) at i82489_readreg+0xd
> lapic_delay(81a84090) at lapic_delay+0x5c
> rtcget(81a84090) at rtcget+0x1a
> resettodr() at resettodr+0x3a
> perform_resettodr(81659e99) at perform_resettodr+0x9
> taskq_thread(0) at taskq_thread+0x57
> end trace frame: 0x0, count: -6

Try running with "-machine q35". It changes the emulated machine to
a modern platform.


-- 
Juan Francisco Cantero Hurtado http://juanfra.info



Re: Undefined reference to functions that are a part of amd64 ABI

2018-04-02 Thread Juan Francisco Cantero Hurtado
On Mon, Apr 02, 2018 at 06:26:04AM +0530, Utkarsh Anand wrote:
> >I understand you're trying to help here, but forcing the use of an
> >ancient compiler is far from perfect in my book.
> I guess you're talking about LuaJIT using gcc by default, because neovim
> now uses clang all around wherever possible.
> 
> >Fixing LuaJIT to build
> >and work on OpenBSD out of the box looks like a much more correct
> >approach, but is not trivial.
> While building does look trivial to me right now, you might want to 
> elaborate a bit more on that. The choice of not using LuaJIT does not 
> entirely depend on me. The owner of the repository asked me to help run 
> CI for OpenBSD and so I did. I have no control over the choices made for
> the project. If I were to 'fix' LuaJIT, a bit more elaboration on what 
> all is required would be really helpful.

A little advice for the CI. Remove /usr/bin/gcc and /usr/bin/g++ from
the system. It will avoid future problems with dependencies calling the
wrong compiler.



-- 
Juan Francisco Cantero Hurtado http://juanfra.info



syspatch exits with 1

2018-04-10 Thread Juan Francisco Cantero Hurtado
syspatch exits with 1 when there was not a real error.

# ksh -x /usr/sbin/syspatch
+ set -e
+ umask 0022
+ id -u
+ let 0 != 0
+ pgrep -qxf /bin/ksh .*reorder_kernel
+ sysctl -n kern.version
+ sed s/^OpenBSD \([0-9]\.[0-9]\)\([^ ]*\).*/\1 \2/;q
+ set -A _KERNV -- 6.3
+ let 1 > 1
+ _OSrev=63
+ 2> /dev/null 
+ machine
+ _MIRROR=http://fastly.cdn.openbsd.org/pub/OpenBSD//syspatch/6.3/amd64
+ sysctl -n hw.ncpufound
+ let 2 > 1
+ _BSDMP=true
+ _PDIR=/var/syspatch
+ mktemp -d -p /tmp syspatch.XX
+ _TMP=/tmp/syspatch.JXvDQcTe2t
+ _KARL=false
+ readonly _BSDMP _KERNV _MIRROR _OSrev _PDIR _TMP
+ trap trap_handler EXIT
+ trap exit HUP INT TERM
+ getopts clRr arg
+ shift 0
+ let 0 != 0
+ let OPTIND == 1
+ rm -f /bsd.syspatch+([[:digit:]])
+ continue
+ continue
+ ls_missing
+ _PATCHES=
+ trap_handler
# echo $?
1

The problem was reported by Marco Di Pietro.


-- 
Juan Francisco Cantero Hurtado http://juanfra.info



Re: syspatch exits with 1

2018-04-10 Thread Juan Francisco Cantero Hurtado
On Tue, Apr 10, 2018 at 01:21:01PM +0200, Antoine Jacoutot wrote:
> On Tue, Apr 10, 2018 at 01:16:34PM +0200, Juan Francisco Cantero Hurtado 
> wrote:
> > syspatch exits with 1 when there was not a real error.
> 
> The "error" is that there's no sig fail available yet (because there are no
> syspatches).

I know but it's just a little weird because the update didn't failed.
Anyway, no complaints, just reporting.


> > # ksh -x /usr/sbin/syspatch
> > + set -e
> > + umask 0022
> > + id -u
> > + let 0 != 0
> > + pgrep -qxf /bin/ksh .*reorder_kernel
> > + sysctl -n kern.version
> > + sed s/^OpenBSD \([0-9]\.[0-9]\)\([^ ]*\).*/\1 \2/;q
> > + set -A _KERNV -- 6.3
> > + let 1 > 1
> > + _OSrev=63
> > + 2> /dev/null 
> > + machine
> > + _MIRROR=http://fastly.cdn.openbsd.org/pub/OpenBSD//syspatch/6.3/amd64
> > + sysctl -n hw.ncpufound
> > + let 2 > 1
> > + _BSDMP=true
> > + _PDIR=/var/syspatch
> > + mktemp -d -p /tmp syspatch.XX
> > + _TMP=/tmp/syspatch.JXvDQcTe2t
> > + _KARL=false
> > + readonly _BSDMP _KERNV _MIRROR _OSrev _PDIR _TMP
> > + trap trap_handler EXIT
> > + trap exit HUP INT TERM
> > + getopts clRr arg
> > + shift 0
> > + let 0 != 0
> > + let OPTIND == 1
> > + rm -f /bsd.syspatch+([[:digit:]])
> > + continue
> > + continue
> > + ls_missing
> > + _PATCHES=
> > + trap_handler
> > # echo $?
> > 1
> > 
> > The problem was reported by Marco Di Pietro.
> > 
> > 
> > -- 
> > Juan Francisco Cantero Hurtado http://juanfra.info
> > 
> 
> -- 
> Antoine
> 

-- 
Juan Francisco Cantero Hurtado http://juanfra.info



Re: hg clone segmentation fault on octeon

2018-05-18 Thread Juan Francisco Cantero Hurtado
On Fri, May 18, 2018 at 07:50:03AM -0700, misch...@offblast.org wrote:
> >Synopsis:hg clone segmentation fault on octeon
> >Category:user mips64
> >Environment:
>   System  : OpenBSD 6.3
>   Details : OpenBSD 6.3 (GENERIC) #0: Sun Mar 25 19:48:22 UTC 2018
>visa@octeon:/usr/src/sys/arch/octeon/compile/GENERIC
> 
>   Architecture: OpenBSD.octeon
>   Machine : octeon
> >Description:
>   mercurial core dumps when executing clone
> >How-To-Repeat:
>   install openbsd/octeon on edgerouter lite
>   single / partition with wxallowed
>   erl# pkg_add mercurial
>   erl$ hg clone https://www.mercurial-scm.org/repo/hello
>   destination directory: hello
>   requesting all changes
>   Segmentation fault (core dumped)
> 
> >Fix:
>   no clue how to fix it. gdb output:

Hi, I don't have an Octeon system to test mercurial but it's working
fine on mips64el. Can you test this command?

hg -v clone http://juanfra684.blinkenshell.org/tmp/hello



-- 
Juan Francisco Cantero Hurtado http://juanfra.info



Re: hg clone segmentation fault on octeon

2018-05-19 Thread Juan Francisco Cantero Hurtado
Try this:

python2.7 -c 'import urllib2; web = 
urllib2.urlopen("https://www.mercurial-scm.org/repo/hello";); print web.read()'

Does python crash?


On Fri, May 18, 2018 at 02:18:13PM -0700, Nick Owens wrote:
> it looks like that's working. with this test mercurial prints (falling back
> to static-http) whereas in the mercurial 'hello' repo it does not. i wonder
> if it has something todo with the web server/http protocol.
> 
> erl$ pwd
> /home/mischief
> erl$ df -h
> Filesystem SizeUsed   Avail Capacity  Mounted on
> /dev/sd0a 13.9G923M   12.3G 7%/
> erl$ uname -a
> OpenBSD erl.house.lan 6.3 GENERIC#0 octeon
> erl$ hg -v clone http://juanfra684.blinkenshell.org/tmp/hello
> (falling back to static-http)
> destination directory: hello
> requesting all changes
> 2 changesets found
> uncompressed size of bundle content:
>  464 (changelog)
>  335 (manifests)
>  143  Makefile
>  388  hello.c
> adding changesets
> adding manifests
> adding file changes
> added 2 changesets with 2 changes to 2 files
> new changesets 0a04b987be5a:82e55d328c8c
> updating to branch default
> resolving manifests
> getting Makefile
> getting hello.c
> 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
> 
> On Fri, May 18, 2018 at 1:49 PM, Juan Francisco Cantero Hurtado <
> i...@juanfra.info> wrote:
> 
> > On Fri, May 18, 2018 at 07:50:03AM -0700, misch...@offblast.org wrote:
> > > >Synopsis:hg clone segmentation fault on octeon
> > > >Category:user mips64
> > > >Environment:
> > >   System  : OpenBSD 6.3
> > >   Details : OpenBSD 6.3 (GENERIC) #0: Sun Mar 25 19:48:22 UTC
> > 2018
> > >visa@octeon:/usr/src/sys/arch/
> > octeon/compile/GENERIC
> > >
> > >   Architecture: OpenBSD.octeon
> > >   Machine : octeon
> > > >Description:
> > >   mercurial core dumps when executing clone
> > > >How-To-Repeat:
> > >   install openbsd/octeon on edgerouter lite
> > >   single / partition with wxallowed
> > >   erl# pkg_add mercurial
> > >   erl$ hg clone https://www.mercurial-scm.org/repo/hello
> > >   destination directory: hello
> > >   requesting all changes
> > >   Segmentation fault (core dumped)
> > >
> > > >Fix:
> > >   no clue how to fix it. gdb output:
> >
> > Hi, I don't have an Octeon system to test mercurial but it's working
> > fine on mips64el. Can you test this command?
> >
> > hg -v clone http://juanfra684.blinkenshell.org/tmp/hello
> >
> >
> >
> > --
> > Juan Francisco Cantero Hurtado http://juanfra.info
> >

-- 
Juan Francisco Cantero Hurtado http://juanfra.info



Re: hg clone segmentation fault on octeon

2018-05-19 Thread Juan Francisco Cantero Hurtado
The segfault is in:
httppeer.py(901): resp.close()

(the line number is not the same because I'm using a different version)

Can you run "make test" within /usr/ports/lang/python/2.7 ?

At the end of the long list of tests, it will run a few tests against
the SSL library. You should see some segfaults there.



On Sat, May 19, 2018 at 10:19:17AM -0700, Nick Owens wrote:
> no, that's working fine. it does not crash and i see the HTML content from
> the webserver.
> 
> i've discovered python has a tracing module and tried it out, but it's not
> making the fault any clearer.
> 
> python2.7 -m trace --trace `which hg` clone
> https://www.mercurial-scm.org/repo/hello
> 
> here's the last 40 or so lines.
> 
>  --- modulename: socket, funcname: readline
> socket.py(411): buf = self._rbuf
> socket.py(412): buf.seek(0, 2)  # seek end
> socket.py(413): if buf.tell() > 0:
> socket.py(415): buf.seek(0)
> socket.py(416): bline = buf.readline(size)
> socket.py(417): if bline.endswith('\n') or len(bline) == size:
> socket.py(418): self._rbuf = StringIO()
> socket.py(419): self._rbuf.write(buf.read())
> socket.py(420): return bline
> keepalive.py(462): if not line:
> keepalive.py(466): if line == '\r\n':
> keepalive.py(467): break
> keepalive.py(470): self.close()
>  --- modulename: keepalive, funcname: close
> keepalive.py(386): if self.fp:
> keepalive.py(387): self.fp.close()
>  --- modulename: socket, funcname: close
> socket.py(281): try:
> socket.py(282): if self._sock:
> socket.py(283): self.flush()
>  --- modulename: socket, funcname: flush
> socket.py(297): if self._wbuf:
> socket.py(285): if self._close:
> socket.py(286): self._sock.close()
>  --- modulename: ssl, funcname: close
> ssl.py(815): if self._makefile_refs < 1:
> ssl.py(819): self._makefile_refs -= 1
> socket.py(287): self._sock = None
> keepalive.py(388): self.fp = None
>  --- modulename: socket, funcname: __del__
> socket.py(290): try:
> socket.py(291): self.close()
>  --- modulename: socket, funcname: close
> socket.py(281): try:
> socket.py(282): if self._sock:
> socket.py(285): if self._close:
> socket.py(286): self._sock.close()
> socket.py(292): except:
> socket.py(294): pass
> keepalive.py(389): if self._handler:
> keepalive.py(390): self._handler._request_closed(self,
> self._host,
> keepalive.py(391):
> self._connection)
>  --- modulename: keepalive, funcname: _request_closed
> keepalive.py(199): self._cm.set_ready(connection, 1)
>  --- modulename: keepalive, funcname: set_ready
> keepalive.py(146): try:
> keepalive.py(147): self._readymap[connection] = ready
> keepalive.py(472): return ''.join(parts)
> keepalive.py(416): self._rbuf = ''
> keepalive.py(417): return s
> Segmentation fault (core dumped)
> 
> 
> 
> On Sat, May 19, 2018 at 7:55 AM, Juan Francisco Cantero Hurtado <
> i...@juanfra.info> wrote:
> 
> > Try this:
> >
> > python2.7 -c 'import urllib2; web = urllib2.urlopen("https://www.
> > mercurial-scm.org/repo/hello"); print web.read()'
> >
> > Does python crash?
> >
> >
> > On Fri, May 18, 2018 at 02:18:13PM -0700, Nick Owens wrote:
> > > it looks like that's working. with this test mercurial prints (falling
> > back
> > > to static-http) whereas in the mercurial 'hello' repo it does not. i
> > wonder
> > > if it has something todo with the web server/http protocol.
> > >
> > > erl$ pwd
> > > /home/mischief
> > > erl$ df -h
> > > Filesystem SizeUsed   Avail Capacity  Mounted on
> > > /dev/sd0a 13.9G923M   12.3G 7%/
> > > erl$ uname -a
> > > OpenBSD erl.house.lan 6.3 GENERIC#0 octeon
> > > erl$ hg -v clone http://juanfra684.blinkenshell.org/tmp/hello
> > > (falling back to static-http)
> > > destination directory: hello
> > > requesting all changes
> > > 2 changesets found
> > > uncompressed size of bundle content:
> > >  464 (changelog)
> > >  335 (manifests)
> > >  143  Makefile
> > >  388  hello.c
> > > adding changesets
> > > addi

Re: hg clone segmentation fault on octeon

2018-05-19 Thread Juan Francisco Cantero Hurtado
No problem. I was asking because I think that the problem is on python
or maybe on libressl, not on mercurial. Mercurial has very few C files
and they don't use C for that part of the clone, just simple python
code.

If you can't run the full tests set, you could also find some small
python example which crashes when it tries to connect to https. That
would be enough.

Meanwhile, if you need to use mercurial, try with ssh:// repos and avoid
the https:// ones.


On Sat, May 19, 2018 at 01:48:30PM -0700, Nick Owens wrote:
> my ERL is very sad and slow with a 500mhz cpu/512M ram and the usb drive is
> very sad and slow at around 1-2MB/s throughput.
> 
> i will see about getting ports going on it, but it may take a while, if it
> even works.
> 
> 
> On Sat, May 19, 2018 at 12:41 PM, Juan Francisco Cantero Hurtado <
> i...@juanfra.info> wrote:
> 
> > The segfault is in:
> > httppeer.py(901): resp.close()
> >
> > (the line number is not the same because I'm using a different version)
> >
> > Can you run "make test" within /usr/ports/lang/python/2.7 ?
> >
> > At the end of the long list of tests, it will run a few tests against
> > the SSL library. You should see some segfaults there.
> >
> >
> >
> > On Sat, May 19, 2018 at 10:19:17AM -0700, Nick Owens wrote:
> > > no, that's working fine. it does not crash and i see the HTML content
> > from
> > > the webserver.
> > >
> > > i've discovered python has a tracing module and tried it out, but it's
> > not
> > > making the fault any clearer.
> > >
> > > python2.7 -m trace --trace `which hg` clone
> > > https://www.mercurial-scm.org/repo/hello
> > >
> > > here's the last 40 or so lines.
> > >
> > >  --- modulename: socket, funcname: readline
> > > socket.py(411): buf = self._rbuf
> > > socket.py(412): buf.seek(0, 2)  # seek end
> > > socket.py(413): if buf.tell() > 0:
> > > socket.py(415): buf.seek(0)
> > > socket.py(416): bline = buf.readline(size)
> > > socket.py(417): if bline.endswith('\n') or len(bline) ==
> > size:
> > > socket.py(418): self._rbuf = StringIO()
> > > socket.py(419): self._rbuf.write(buf.read())
> > > socket.py(420): return bline
> > > keepalive.py(462): if not line:
> > > keepalive.py(466): if line == '\r\n':
> > > keepalive.py(467): break
> > > keepalive.py(470): self.close()
> > >  --- modulename: keepalive, funcname: close
> > > keepalive.py(386): if self.fp:
> > > keepalive.py(387): self.fp.close()
> > >  --- modulename: socket, funcname: close
> > > socket.py(281): try:
> > > socket.py(282): if self._sock:
> > > socket.py(283): self.flush()
> > >  --- modulename: socket, funcname: flush
> > > socket.py(297): if self._wbuf:
> > > socket.py(285): if self._close:
> > > socket.py(286): self._sock.close()
> > >  --- modulename: ssl, funcname: close
> > > ssl.py(815): if self._makefile_refs < 1:
> > > ssl.py(819): self._makefile_refs -= 1
> > > socket.py(287): self._sock = None
> > > keepalive.py(388): self.fp = None
> > >  --- modulename: socket, funcname: __del__
> > > socket.py(290): try:
> > > socket.py(291): self.close()
> > >  --- modulename: socket, funcname: close
> > > socket.py(281): try:
> > > socket.py(282): if self._sock:
> > > socket.py(285): if self._close:
> > > socket.py(286): self._sock.close()
> > > socket.py(292): except:
> > > socket.py(294): pass
> > > keepalive.py(389): if self._handler:
> > > keepalive.py(390):     self._handler._request_closed(self,
> > > self._host,
> > > keepalive.py(391):
> > > self._connection)
> > >  --- modulename: keepalive, funcname: _request_closed
> > > keepalive.py(199): self._cm.set_ready(connection, 1)
> > >  --- modulename: keepalive, funcname: set_ready
> > > keepalive.py(146): try:
> > > keepalive.py(147): self._readymap[connection] = ready
> > > keepalive.py(472): return ''.join(parts)
>

Something is broken on Octeon. Maybe related to the threading code?

2018-05-21 Thread Juan Francisco Cantero Hurtado
Hi, this was reported by Nick Owens and I don't have an Octeon to run
tests, so everything are guesses.

He is seeing segfaults in python applications. The first segfault was in
mercurial when it tries to close a https session. The segfault doesn't
happen with a http connection.

The second segfault happens in the python tests. The backtrace shows
"sock_recv_guts" from Modules/socketmodule.c:2441. The crash is in the
timeout:

BEGIN_SELECT_LOOP(s)
Py_BEGIN_ALLOW_THREADS
timeout = internal_select_ex(s, 0, interval);
if (!timeout)
outlen = recv(s->sock_fd, cbuf, len, flags);
Py_END_ALLOW_THREADS

So, looks like the segfaults are always related to threads and sockets.
The version is 6.3. The full thread
https://marc.info/?t=15266553141&r=1&w=2 .

The simpler test case is:
$ cd /usr/ports/lang/python/2.7
$ DEBUG=-g make test


-- 
Juan Francisco Cantero Hurtado http://juanfra.info



armv7: pmap_fault_fixup: va 00008000 ftype 5 u pte 7ff2a02e

2016-06-24 Thread Juan Francisco Cantero Hurtado
I'm trying to install OpenBSD on a Olimex LIME2 board. I didn't know
exactly how to install the system on this board, so I used the
cubieboard image, overwrote the u-boot image with
u-boot-sunxi-with-spl.bin (from ports) and changed the dtb file to
sun7i-a20-olinuxino-lime2.dtb (also from ports).

I don't know if this is a real bug or I fucked up something.


Connected to /dev/cuaU0 (speed 115200)

U-Boot SPL 2016.05 (Jun 23 2016 - 01:28:15)
DRAM: 1024 MiB
CPU: 91200Hz, AXI/AHB/APB: 3/2/2
Trying to boot from MMC1


U-Boot 2016.05 (Jun 23 2016 - 01:28:15 -0600) Allwinner Technology

CPU:   Allwinner A20 (SUN7I)
Model: Olimex A20-OLinuXino-LIME2
I2C:   ready
DRAM:  1 GiB
MMC:   SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment

In:serial
Out:   serial
Err:   serial
SCSI:  SATA link 0 timeout.
AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode
flags: ncq stag pm led clo only pmp pio slum part ccc apst
Net:   eth0: ethernet@01c5
starting USB...
USB0:   USB EHCI 1.00
USB1:   USB OHCI 1.0
USB2:   USB EHCI 1.00
USB3:   USB OHCI 1.0
scanning bus 0 for devices... 1 USB Device(s) found
scanning bus 2 for devices... 1 USB Device(s) found
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
reading /sun7i-a20-olinuxino-lime2.dtb
29895 bytes read in 30 ms (972.7 KiB/s)
Found EFI removable media binary efi/boot/bootarm.efi
reading efi/boot/bootarm.efi
65196 bytes read in 43 ms (1.4 MiB/s)
## Starting EFI application at 0x4200 ...
Scanning disks on scsi...
Scanning disks on usb...
Scanning disks on mmc...
MMC Device 1 not found
MMC Device 2 not found
MMC Device 3 not found
Found 2 disks
>> OpenBSD/armv7 BOOTARM 0.1
boot>
cannot open sd0a:/etc/random.seed: No such file or directory
booting sd0a:/bsd: 2077592+7932172+435436 [64+294720+141677]=0xa6585c

OpenBSD/armv7 booting ...
arg0 0x0 arg1 0x10bb arg2 0x4800
Allocating page tables
freestart = 0x40d66000, free_pages = 258714 (0x0003f29a)
IRQ stack: p0x40d94000 v0xc0d94000
ABT stack: p0x40d95000 v0xc0d95000
UND stack: p0x40d96000 v0xc0d96000
SVC stack: p0x40d97000 v0xc0d97000
Creating L1 page table at 0x40d68000
Mapping kernel
Constructing L2 page tables
undefined page pmap board type: 4283
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California.  All rights reserved.
Copyright (c) 1995-2016 OpenBSD. All rights reserved.  http://www.OpenBSD.org

OpenBSD 6.0-beta (RAMDISK) #78: Fri Jun 24 17:20:02 AEST 2016
j...@armv7.jsg.id.au:/usr/src/sys/arch/armv7/compile/RAMDISK
real mem  = 1073741824 (1024MB)
avail mem = 1038819328 (990MB)
mainbus0 at root: Olimex A20-OLinuXino-LIME2
cpu0 at mainbus0: ARM Cortex A7 rev 4 (ARMv7 core)
cpu0: DC enabled IC enabled WB disabled EABT branch prediction enabled
cpu0: 32KB(32b/l,2way) I-cache, 32KB(64b/l,4way) wr-back D-cache
cortex0 at mainbus0
ampintc0 at cortex0 nirq 160
agtimer0 at cortex0: tick rate 24000 KHz
sunxi0 at mainbus0
sxipio0 at sunxi0
sxiccmu0 at sunxi0
sxidog0 at sunxi0
sxirtc0 at sunxi0
ahci0 at sunxi0 AHCI 1.1
scsibus0 at ahci0: 32 targets
ehci0 at sunxi0
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Allwinner EHCI root hub" rev 2.00/1.00 addr 1
ehci1 at sunxi0
usb1 at ehci1: USB revision 2.0
uhub1 at usb1 "Allwinner EHCI root hub" rev 2.00/1.00 addr 1
gpio0 at sxipio0: 18 pins
gpio1 at sxipio0: 24 pins
gpio2 at sxipio0: 25 pins
gpio3 at sxipio0: 28 pins
gpio4 at sxipio0: 12 pins
gpio5 at sxipio0: 6 pins
gpio6 at sxipio0: 12 pins
gpio7 at sxipio0: 28 pins
gpio8 at sxipio0: 22 pins
simplebus0 at mainbus0: "soc"
sxiuart0 at simplebus0: console
boot device: lookup 'sd0a:/bsd' failed.
root on rd0a swap on rd0b dump on rd0b
WARNING: clock lost 16976 days
WARNING: CHECK AND RESET THE DATE!
erase ^?, werase ^W, kill ^U, intr ^C, status ^T

Welcome to the OpenBSD/armv7 6.0 installation program.
(I)nstall, (U)pgrade, (A)utoinstall or (S)hell? i
pmap_fault_fixup: va 8000 ftype 5 u pte 7ff2a02e
pmap_fault_fixup: va 8000 ftype 5 u pte 7ff2a02e
pmap_fault_fixup: va 8000 ftype 5 u pte 7ff2a02e
pmap_fault_fixup: va 8000 ftype 5 u pte 7ff2a02e
pmap_fault_fixup: va 8000 ftype 5 u pte 7ff2a02e
pmap_fault_fixup: va 8000 ftype 5 u pte 7ff2a02e
pmap_fault_fixup: va 8000 ftype 5 u pte 7ff2a02e
pmap_fault_fixup: va 8000 ftype 5 u pte 7ff2a02e
pmap_fault_fixup: va 8000 ftype 5 u pte 7ff2a02e
pmap_fault_fixup: va 8000 ftype 5 u pte 7ff2a02e
pmap_fault_fixup: va 8000 ftype 5 u pte 7ff2a02e
pmap_fault_fixup: va 8000 ftype 5 u pte 7ff2a02e
pmap_fault_fixup: va 8000 ftype 5 u pte 7ff2a02e
pmap_fault_fixup: va 8000 ftype 5 u pte 7ff2a02e
pmap_fault_fixup: va 8000 ftype 5 u pte 7ff2a02e
pmap_fault_fixup: va 8000 ftype 5 u pte 7ff2a02e
pmap_fault_fixup: va 8000 ftype 5 u pte 7ff2a02e
pmap_fault_fixup: va 8000 ftype 5 u pte 7ff2a02e
pmap_fault_fixup: va 8000 ftype 5 u pte 7ff2a02e
pmap_fault_fixup: va 8000 ftype 5 u pte 7ff2a02e
pmap_fault_fixu

Re: update print/scribus to 1.4.6

2016-08-06 Thread Juan Francisco Cantero Hurtado
Don't take my comment personally but your patch is quite bad. Please,
read our Porter's Handbook https://www.openbsd.org/faq/ports/index.html

And the list to send new ports and updates is ports@.

On Sat, Aug 06, 2016 at 07:56:40PM +0200, pku...@anongoth.pl wrote:
> >Synopsis:  print/scribus is at version 1.4.5
> >Category:  user
> >Environment:
> System  : OpenBSD 5.9
> Details : OpenBSD 5.9 (GENERIC.MP) #3: Wed Aug  3 00:03:22 CEST 
> 2016
>  
> root@ThinkPad-X200.local:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> 
> Architecture: OpenBSD.amd64
> Machine : amd64
> >Description:
> Scribus is available in version 1.4.6. This patch is against latest 
> HEAD. I've verified that it builds fine.
> >How-To-Repeat:
> pkg_info scribus
> >Fix:
> Apply the patch and build the ports.
> 
> 
> scribus.patch:
> cvs server: Diffing .
> Index: Makefile
> ===
> RCS file: /cvs/ports/print/scribus/Makefile,v
> retrieving revision 1.57
> diff -u -p -u -r1.57 Makefile
> --- Makefile20 Mar 2016 16:12:26 -  1.57
> +++ Makefile6 Aug 2016 17:30:56 -
> @@ -1,7 +1,7 @@
>  # $OpenBSD: Makefile,v 1.57 2016/03/20 16:12:26 naddy Exp $
>  
>  COMMENT=   DTP program
> -DISTNAME=  scribus-1.4.5
> +DISTNAME=  scribus-1.4.6
>  CATEGORIES=print
>  
>  HOMEPAGE=  http://www.scribus.net/
> @@ -13,9 +13,9 @@ WANTLIB +=QtGui QtNetwork QtXml c cairo
>  WANTLIB += fontconfig freetype hyphen jpeg lcms2 m podofo pthread
>  WANTLIB += stdc++ tiff util xml2 z ${MODPY_WANTLIB}
>  
> -MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=scribus/}
> +MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=scribus/1.4.6/}
>  
> -EXTRACT_SUFX=  .tar.bz2
> +EXTRACT_SUFX=  .tar.xz
>  
>  MODULES=   x11/qt4 \
> devel/cmake \
> @@ -23,7 +23,8 @@ MODULES=  x11/qt4 \
>  
>  MODPY_RUNDEP=  No
>  
> -BUILD_DEPENDS= devel/boost
> +BUILD_DEPENDS= archivers/xz \
> +   devel/boost
>  RUN_DEPENDS=   devel/desktop-file-utils \
> graphics/py-Pillow \
> print/ghostscript/gnu \
> Index: distinfo
> ===
> RCS file: /cvs/ports/print/scribus/distinfo,v
> retrieving revision 1.11
> diff -u -p -u -r1.11 distinfo
> --- distinfo5 Jan 2016 11:24:05 -   1.11
> +++ distinfo6 Aug 2016 17:30:56 -
> @@ -1,2 +1,2 @@
> -SHA256 (scribus-1.4.5.tar.bz2) = n3BvBWHSa7EbvlWGkK4FB802ieOB9uF6qUEdnE71hJg=
> -SIZE (scribus-1.4.5.tar.bz2) = 78251228
> +SHA256 (scribus-1.4.6.tar.xz) = IeM2UA2e3JyQzPcwh+XvPfWew+Sjy/7BU2e82NB4oZo=
> +SIZE (scribus-1.4.6.tar.xz) = 73601104
> cvs server: Diffing patches
> Index: patches/patch-CMakeLists_txt
> ===
> RCS file: /cvs/ports/print/scribus/patches/patch-CMakeLists_txt,v
> retrieving revision 1.2
> diff -u -p -u -r1.2 patch-CMakeLists_txt
> --- patches/patch-CMakeLists_txt5 Jan 2016 11:24:05 -   1.2
> +++ patches/patch-CMakeLists_txt6 Aug 2016 17:30:56 -
> @@ -1,15 +1,6 @@
>  $OpenBSD: patch-CMakeLists_txt,v 1.2 2016/01/05 11:24:05 landry Exp $
>  --- CMakeLists.txt.origMon Jan  5 22:53:23 2015
>  +++ CMakeLists.txt Mon Jan  4 17:08:50 2016
> -@@ -274,7 +274,7 @@ ENDIF (APPLEBUNDLE)
> - #Setp all the directories we will use
> - #MAN
> - CMAKE_POLICY(SET CMP0005 OLD)
> --SET(MANDIR "share/man/")
> -+SET(MANDIR "man/")
> - IF(WANT_VERSIONING)
> - SET(SHAREDIR "share/${MAIN_DIR_NAME}${TAG_VERSION}/")
> - ELSE(WANT_VERSIONING)
>  @@ -345,7 +345,7 @@ IF(WANT_LIB64)
> ENDIF(NOT ARCH_X86_64)
> SET(LIB_SUFFIX "64" CACHE TYPE STRING)
> cvs server: Diffing pkg
> 

-- 
Juan Francisco Cantero Hurtado http://juanfra.info



kernel crash armv7 A20: "exec /sbin/init: error 8. init: not found."

2016-08-16 Thread Juan Francisco Cantero Hurtado
1.a) swap on sd0b dump on sd0b

exec /sbin/init: error 8

init: not found

panic: no init

Stopped at  $d: ldrbr15, [r15, r15, ror r15]!

   TIDPIDUID PRFLAGS PFLAGS  CPU  COMMAND

*1  1  0   0  00  swapper

panic+0x18

scp=0xc03c64e8 rlv=0xc0399908 (start_init+0x210)

rsp=0xcc3bbf48 rfp=0xcc3bbfac

start_init+0x10

scp=0xc0399708 rlv=0xc05331d0 (proc_trampoline+0x18)

rsp=0xcc3bbfb0 rfp=0xc0816f54

r10=0xc06fe60c r9=0x r8=0xc06fe7b8 r7=0x

r6=0x r5=0xca4a2000 r4=0xc03996f8

Bad frame pointer: 0xc0816f54

http://www.openbsd.org/ddb.html describes the minimum info required in bug

reports.  Insufficient info makes it difficult to find and fix bugs.

ddb> trace

panic+0x18

scp=0xc03c64e8 rlv=0xc0399908 (start_init+0x210)

rsp=0xcc3bbf48 rfp=0xcc3bbfac

start_init+0x10

scp=0xc0399708 rlv=0xc05331d0 (proc_trampoline+0x18)

rsp=0xcc3bbfb0 rfp=0xc0816f54

r10=0xc06fe60c r9=0x r8=0xc06fe7b8 r7=0x

r6=0x r5=0xca4a2000 r4=0xc03996f8

Bad frame pointer: 0xc0816f54

ddb> ps

   TID   PPID   PGRPUID  S   FLAGS  WAIT  COMMAND

 51595  0  0  0  3 0x14200  pgzerozerothread

 72043  0  0  0  3 0x14200  aiodoned  aiodoned

  1863  0  0  0  3 0x14200  syncerupdate

 84365  0  0  0  3 0x14200  cleaner   cleaner

 78275  0  0  0  3 0x14200  reaperreaper

 80532  0  0  0  3 0x14200  pgdaemon  pagedaemon

 43762  0  0  0  3 0x14200  bored crynlk

 23050  0  0  0  3 0x14200  bored crypto

 86258  0  0  0  3 0x14200  pftm  pfpurge

 48084  0  0  0  3 0x14200  usbtskusbtask

  3509  0  0  0  3 0x14200  usbatsk   usbatsk

 30447  0  0  0  3 0x14200  bored softnet

 60192  0  0  0  3 0x14200  bored systqmp

 98796  0  0  0  3 0x14200  bored systq

 56322  0  0  0  3  0x40014200idle0

 71450  0  0  0  3 0x14200  kmalloc   kmthread

*1  0  0  0  7   0swapper

 0 -1  0  0  3 0x10200  scheduler swapper

ddb> show uvm

Current UVM status:

  pagesize=4096 (0x1000), pagemask=0xfff, pageshift=12

  255079 VM pages: 1 active, 0 inactive, 0 wired, 254128 free (31775 zero)

  min  10% (25) anon, 10% (25) vnode, 5% (12) vtext

  pages  0 anon, 0 vnode, 0 vtext

  freemin=8502, free-target=11336, inactive-target=0, wired-max=85026

  faults=1, traps=53, intrs=0, ctxswitch=802 fpuswitch=0

  softint=480, syscalls=0, kmapent=23

  fault counts:

noram=0, noanon=0, noamap=0, pgwait=0, pgrele=0

ok relocks(total)=0(0), anget(retries)=0(0), amapcopy=0

neighbor anon/obj pg=0/0, gets(lock/unlock)=0/0

cases: anon=0, anoncow=0, obj=0, prcopy=0, przero=1

  daemon and swap counts:

woke=0, revs=0, scans=0, obscans=0, anscans=0

busy=0, freed=0, reactivate=0, deactivate=0

pageouts=0, pending=0, nswget=0

nswapdev=0, nanon=0, nanonneeded=0 nfreeanon=0

swpages=0, swpginuse=0, swpgonly=0 paging=0

  kernel pointers:

objs(kern)=0xc06dda1c

ddb> show bcstats

Current Buffer Cache status:

numbufs 16 busymapped 0, delwri 0

kvaslots 409 avail kva slots 409

bufpages 61, dirtypages 0

pendingreads 0, pendingwrites 0

ddb> 

Current Buffer Cache status:

numbufs 16 busymapped 0, delwri 0

kvaslots 409 avail kva slots 409

bufpages 61, dirtypages 0

pendingreads 0, pendingwrites 0

ddb> 


-- 
Juan Francisco Cantero Hurtado http://juanfra.info



Re: kernel crash armv7 A20: "exec /sbin/init: error 8. init: not found."

2016-08-17 Thread Juan Francisco Cantero Hurtado
On Wed, Aug 17, 2016 at 11:33:19AM +0200, Mark Kettenis wrote:
> > Date: Wed, 17 Aug 2016 01:19:46 +0200
> > From: Juan Francisco Cantero Hurtado 
> > 
> > I guess that the kernel can't read the HDD connected to the SATA port.
> > fsck can't find any sector when I run it using bsd.rd.
> 
> Not sure what's going on here.  But I made a critical fix on the 15th.
> The timestamp on the snapshot suggests that that fix should be present
> in your kernel, but perhaps Theo hand't updated his tree yet.  Given
> the various isses we had over the last couple of days that wouldn't be
> a huge surprise.
> 
> Try again with the next snapshot.
> 

I've tried with the latest snapshot and also built a kernel manually.
Didn't work. Also, I reverted your commit "Use the regulator API to
supply power to the target" and it didn't fix the problem.


-- 
Juan Francisco Cantero Hurtado http://juanfra.info



Re: kernel crash armv7 A20: "exec /sbin/init: error 8. init: not found."

2016-08-25 Thread Juan Francisco Cantero Hurtado
On Wed, Aug 17, 2016 at 10:23:24PM +0200, Juan Francisco Cantero Hurtado wrote:
> On Wed, Aug 17, 2016 at 11:33:19AM +0200, Mark Kettenis wrote:
> > > Date: Wed, 17 Aug 2016 01:19:46 +0200
> > > From: Juan Francisco Cantero Hurtado 
> > > 
> > > I guess that the kernel can't read the HDD connected to the SATA port.
> > > fsck can't find any sector when I run it using bsd.rd.
> > 
> > Not sure what's going on here.  But I made a critical fix on the 15th.
> > The timestamp on the snapshot suggests that that fix should be present
> > in your kernel, but perhaps Theo hand't updated his tree yet.  Given
> > the various isses we had over the last couple of days that wouldn't be
> > a huge surprise.
> > 
> > Try again with the next snapshot.
> > 
> 
> I've tried with the latest snapshot and also built a kernel manually.
> Didn't work. Also, I reverted your commit "Use the regulator API to
> supply power to the target" and it didn't fix the problem.

I've tested the HDD again. This time with an external power adapter and
the kernel crashes at the same point. The system is updated and
everything works with an external USB adapter.

-- 
Juan Francisco Cantero Hurtado http://juanfra.info



Re: USB-early device attach produces panic in xhci

2015-08-20 Thread Juan Francisco Cantero Hurtado
Meanwhile, I uploaded the files to https://cloudup.com/ca1OKXWA9o9

On Thu, Aug 20, 2015 at 10:51:30PM +0200, Peter N. M. Hansteen wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Sorry about that, the same files are slowly slithering onto
> http://home.nuug.no/~peter/20150820/ as well (significantly faster,
> once they get there)
> 
> - -P
> 
> On 08/20/15 22:07, Tobias Ulmer wrote:
> > On Thu, Aug 20, 2015 at 09:58:29PM +0200, pe...@bsdly.net wrote:
> >>> Synopsis: panic in xhci on attach of old-ish usb storage 
> >>> Category: xhci, usb, panic Environment:
> >> System  : OpenBSD 5.8 Details : OpenBSD 5.8 (GENERIC.MP)
> >> #1236: Sun Aug 16 02:31:04 MDT 2015 
> >> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> >>
> >>
> >> 
> Architecture: OpenBSD.amd64
> >> Machine : amd64
> >>> Description:
> >> ttaching a USB storage device I've used previously now paniced my
> >> laptop. Photos of the panic are at
> >> http://www.bsdly.net/~peter/20150820/, however rebooting the
> >> system with the drive still attached produced a very similar
> >> panic. Original panic
> >> http://www.bsdly.net/~peter/20150820/20150820_212456.jpg through
> >> the fist 4-5 images, the rest are from the second (but likely the
> >> shots after the first handful are somewhat repetetive.
> >> 
> > 
> > The machine serving the pictures is unbelievably slow, and the
> > pictures are rather large... That's not fun at all.
> > 
> > 
> 
> - -- 
> Peter N. M. Hansteen, member of the first RFC 1149 implementation team
> http://bsdly.blogspot.com/ http://www.bsdly.net/ http://www.nuug.no/
> "Remember to set the evil bit on all malicious network traffic"
> delilah spamd[29949]: 85.152.224.147: disconnected after 42673 seconds.
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1
> 
> iQIcBAEBAgAGBQJV1j3SAAoJELJiGF9h4DyeJ8IP/jiZHjQGaUEV+ZlUdtQ6ma1d
> VBYzhwJ3aCmE1g0KQviogtLQuD+mH3QdaT9IxmVrordWv5+4dFcCI5axsr/Xc+Cn
> Qknif29rY907euYtoQii85l5XnLdNJgQywdxwsz4XDH/PVcju3q7HMVZ4LLAju5e
> 7xHp0xq95No7+Uz69G20v/ERVaJIBMvgmkHeOmDLywKiWW8gmH4027pArOqjtQUH
> nfhpo9lzBZoeP/tcHD+TznIxsT7bZNYTVVmdI1tPW7hNUv7lzGEAZCkV28+CJ6Ds
> q6RblyW6OKxNs4wI0OIRhPtyGwCI+zjCWF65x9NJy9vDoX+KQz8h8iQTFYp8W0en
> EvClqZmn1zDO03GpnQ3LAcH8mbMPqaNZ/QTCOrb4nP2pvLwy184Br9K5zN89Dvsk
> 71h8t+wiydzfaXTTg9abJirHcyHbXyrqALsEpyXIHcaYva3vEDcB1p4F1D6wFCNr
> ccYSyC8aAyio5otbe1BNa5Tyry5AlT2w/uEveYrv39SzRJY27gSmc5mZRmVZT4Zl
> O+dOfP6LTWS/454w3ra6BRrhpNVQ637BTNFSo1IbkHwqnK4BlK8r3xUFu5aojhdB
> xI9YbZ485V3JaSN41/N7oPXz9+Dgo4L+Ce4Fwf5ssAQIj6VZt/84NTCxdHzX98t0
> 8k040Vj+UEYddTveuPxG
> =a5JF
> -END PGP SIGNATURE-
> 

-- 
Juan Francisco Cantero Hurtado http://juanfra.info



Radeon Mobility M10/-current: [drm:pid0:radeon_get_bios] *ERROR* Unable to locate a BIOS ROM

2015-12-13 Thread Juan Francisco Cantero Hurtado
I've problems with the Radeon on -current:

root on wd0a (3ae3e59f95acc9ef.a) swap on wd0b dump on wd0b
error: [drm:pid0:radeon_get_bios] *ERROR* Unable to locate a BIOS ROM
trying to bind memory to uninitialized GART !
error: [drm:pid0:radeon_ttm_backend_bind] *ERROR* failed to bind 1 pages at 
0x
drm:pid0:radeon_wb_init *WARNING* (-22) create WB bo failed
drm:pid0:r300_init *ERROR* Disabling GPU acceleration
ttm_pool_mm_shrink_fini stub
error: [drm:pid0:radeon_get_bios] *ERROR* Unable to locate a BIOS ROM
radeondrm0: 800x600
wsdisplay0 at radeondrm0 mux 1: console (std, vt100 emulation), using wskbd0
wskbd1: connecting to wsdisplay0
wsdisplay0: screen 1-5 added (std, vt100 emulation)

IIRC, the Radeon in this PowerBook worked fine with 5.8. I've
installed the snapshot and the firmware several times without luck.

>Environment:
System  : OpenBSD 5.8
Details : OpenBSD 5.8-current (GENERIC) #836: Sat Dec 12 11:26:29 
MST 2015
 
dera...@macppc.openbsd.org:/usr/src/sys/arch/macppc/compile/GENERIC

Architecture: OpenBSD.macppc
Machine : macppc

dmesg:
OpenBSD 5.8-current (GENERIC) #836: Sat Dec 12 11:26:29 MST 2015
dera...@macppc.openbsd.org:/usr/src/sys/arch/macppc/compile/GENERIC
real mem = 536870912 (512MB)
avail mem = 506568704 (483MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root: model PowerBook5,2
cpu0 at mainbus0: 7457 (Revision 0x101): 1249 MHz: 512KB L2 cache
mem0 at mainbus0
spdmem0 at mem0: 512MB DDR SDRAM non-parity PC2700CL2.5
memc0 at mainbus0: uni-n rev 0xd2
"hw-clock" at memc0 not configured
kiic0 at memc0 offset 0xf8001000
iic0 at kiic0
adt0 at iic0 addr 0xae: adt7460 rev 0x62
"cy28512" at iic0 addr 0xe9 not configured
"lmu-controller" at iic0 addr 0x42 not configured
mpcpcibr0 at mainbus0 pci: uni-north
pci0 at mpcpcibr0 bus 0
pchb0 at pci0 dev 11 function 0 "Apple UniNorth AGP" rev 0x00
radeondrm0 at pci0 dev 16 function 0 "ATI Radeon Mobility M10" rev 0x00
drm0 at radeondrm0
radeondrm0: irq 48
mpcpcibr1 at mainbus0 pci: uni-north
pci1 at mpcpcibr1 bus 0
macobio0 at pci1 dev 23 function 0 "Apple Intrepid" rev 0x00
openpic0 at macobio0 offset 0x4: version 0x4614 feature 3f0302 LE
macgpio0 at macobio0 offset 0x50
macgpio1 at macgpio0 offset 0x9: irq 47
"programmer-switch" at macgpio0 offset 0x11 not configured
"gpio4" at macgpio0 offset 0x1e not configured
"frequency-gpio" at macgpio0 offset 0x1a not configured
"voltage-gpio" at macgpio0 offset 0x1b not configured
"slewing-done" at macgpio0 offset 0x12 not configured
"gpio5" at macgpio0 offset 0x6f not configured
"gpio6" at macgpio0 offset 0x70 not configured
"extint-gpio4" at macgpio0 offset 0x5c not configured
"gpio11" at macgpio0 offset 0x75 not configured
"extint-gpio15" at macgpio0 offset 0x67 not configured
"escc-legacy" at macobio0 offset 0x12000 not configured
zs0 at macobio0 offset 0x13000: irq 22,23
zstty0 at zs0 channel 0
zstty1 at zs0 channel 1
snapper0 at macobio0 offset 0x1: irq 30,1,2
"timer" at macobio0 offset 0x15000 not configured
adb0 at macobio0 offset 0x16000: irq 25, via-pmu, 3 targets
apm0 at adb0: battery flags 0x5, 0% charged
piic0 at adb0
iic1 at piic0
akbd0 at adb0 addr 2: iBook keyboard with inverted T (ISO layout)
wskbd0 at akbd0: console keyboard
ams0 at adb0 addr 3: EMP trackpad  4-button, 400 dpi
wsmouse0 at ams0 mux 0
abtn0 at adb0 addr 7: brightness/volume/eject buttons
"battery" at macobio0 offset 0x0 not configured
"backlight" at macobio0 offset 0xf300 not configured
kiic1 at macobio0 offset 0x18000
iic2 at kiic1
wdc0 at macobio0 offset 0x2 irq 24: DMA
atapiscsi0 at wdc0 channel 0 drive 0
scsibus1 at atapiscsi0: 2 targets
cd0 at scsibus1 targ 0 lun 0:  ATAPI 5/cdrom 
removable
cd0(wdc0:0:0): using BIOS timings, DMA mode 2
audio0 at snapper0
bwi0 at pci1 dev 18 function 0 "Broadcom BCM4306" rev 0x03: irq 52, address 
00:0a:95:f5:1a:22
cbb0 at pci1 dev 19 function 0 "TI PCI1510 CardBus" rev 0x00: irq 53
ohci0 at pci1 dev 26 function 0 "Apple Intrepid USB" rev 0x00: irq 29, version 
1.0, legacy support
ohci1 at pci1 dev 27 function 0 "NEC USB" rev 0x43: irq 63, version 1.0
ohci2 at pci1 dev 27 function 1 "NEC USB" rev 0x43: irq 63, version 1.0
ehci0 at pci1 dev 27 function 2 "NEC USB" rev 0x04: irq 63
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "NEC EHCI root hub" rev 2.00/1.00 addr 1
cardslot0 at cbb0 slot 0 flags 0
cardbus0 at cardslot0: bus 1 device 0 cacheline 0x8, lattimer 0x20
pcmcia0 at cardslot0
usb1 at ohci0: USB revision 1.0
uhub1 at usb1 "Apple OHCI root hub" rev 1.00/1.00 addr 1
usb2 at ohci1: USB revision 1.0
uhub2 at usb2 "NEC OHCI root hub" rev 1.00/1.00 addr 1
usb3 at ohci2: USB revision 1.0
uhub3 at usb3 "NEC OHCI root hub" rev 1.00/1.00 addr 1
mpcpcibr2 at mainbus0 pci: uni-north
pci2 at mpcpcibr2 bus 0
kauaiata0 at pci2 dev 13 function 0 "Apple Intrepid ATA" rev 0x00
wdc1 at kauaiata0 irq 39: DMA
wd0 at wdc1 channel 0 drive 0: 
wd0: 16-sector PIO, LBA48, 76319MB, 156301488 sectors

Re: Radeon Mobility M10/-current: [drm:pid0:radeon_get_bios] *ERROR* Unable to locate a BIOS ROM

2015-12-14 Thread Juan Francisco Cantero Hurtado
More info:

I've been rebooting the machine tens of times today. Only two times
OpenBSD (console) got the resolution of the screen correctly (1280x854).

Xorg runs at 800x600 but I can change it with "xrandr --output LVDS
--auto". No errors in Xorg.0.log. BTW, resizing a xterm window is very
slow.

I reset Open Firmware to defaults. No changes.

On Sun, Dec 13, 2015 at 10:36:01PM +0100, Juan Francisco Cantero Hurtado wrote:
> I've problems with the Radeon on -current:
> 
> root on wd0a (3ae3e59f95acc9ef.a) swap on wd0b dump on wd0b
> error: [drm:pid0:radeon_get_bios] *ERROR* Unable to locate a BIOS ROM
> trying to bind memory to uninitialized GART !
> error: [drm:pid0:radeon_ttm_backend_bind] *ERROR* failed to bind 1 pages at 
> 0x
> drm:pid0:radeon_wb_init *WARNING* (-22) create WB bo failed
> drm:pid0:r300_init *ERROR* Disabling GPU acceleration
> ttm_pool_mm_shrink_fini stub
> error: [drm:pid0:radeon_get_bios] *ERROR* Unable to locate a BIOS ROM
> radeondrm0: 800x600
> wsdisplay0 at radeondrm0 mux 1: console (std, vt100 emulation), using wskbd0
> wskbd1: connecting to wsdisplay0
> wsdisplay0: screen 1-5 added (std, vt100 emulation)
> 
> IIRC, the Radeon in this PowerBook worked fine with 5.8. I've
> installed the snapshot and the firmware several times without luck.
> 
> >Environment:
>   System  : OpenBSD 5.8
>   Details : OpenBSD 5.8-current (GENERIC) #836: Sat Dec 12 11:26:29 
> MST 2015
>
> dera...@macppc.openbsd.org:/usr/src/sys/arch/macppc/compile/GENERIC
> 
>   Architecture: OpenBSD.macppc
>   Machine : macppc
> 
> dmesg:
> OpenBSD 5.8-current (GENERIC) #836: Sat Dec 12 11:26:29 MST 2015
> dera...@macppc.openbsd.org:/usr/src/sys/arch/macppc/compile/GENERIC
> real mem = 536870912 (512MB)
> avail mem = 506568704 (483MB)
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root: model PowerBook5,2
> cpu0 at mainbus0: 7457 (Revision 0x101): 1249 MHz: 512KB L2 cache
> mem0 at mainbus0
> spdmem0 at mem0: 512MB DDR SDRAM non-parity PC2700CL2.5
> memc0 at mainbus0: uni-n rev 0xd2
> "hw-clock" at memc0 not configured
> kiic0 at memc0 offset 0xf8001000
> iic0 at kiic0
> adt0 at iic0 addr 0xae: adt7460 rev 0x62
> "cy28512" at iic0 addr 0xe9 not configured
> "lmu-controller" at iic0 addr 0x42 not configured
> mpcpcibr0 at mainbus0 pci: uni-north
> pci0 at mpcpcibr0 bus 0
> pchb0 at pci0 dev 11 function 0 "Apple UniNorth AGP" rev 0x00
> radeondrm0 at pci0 dev 16 function 0 "ATI Radeon Mobility M10" rev 0x00
> drm0 at radeondrm0
> radeondrm0: irq 48
> mpcpcibr1 at mainbus0 pci: uni-north
> pci1 at mpcpcibr1 bus 0
> macobio0 at pci1 dev 23 function 0 "Apple Intrepid" rev 0x00
> openpic0 at macobio0 offset 0x4: version 0x4614 feature 3f0302 LE
> macgpio0 at macobio0 offset 0x50
> macgpio1 at macgpio0 offset 0x9: irq 47
> "programmer-switch" at macgpio0 offset 0x11 not configured
> "gpio4" at macgpio0 offset 0x1e not configured
> "frequency-gpio" at macgpio0 offset 0x1a not configured
> "voltage-gpio" at macgpio0 offset 0x1b not configured
> "slewing-done" at macgpio0 offset 0x12 not configured
> "gpio5" at macgpio0 offset 0x6f not configured
> "gpio6" at macgpio0 offset 0x70 not configured
> "extint-gpio4" at macgpio0 offset 0x5c not configured
> "gpio11" at macgpio0 offset 0x75 not configured
> "extint-gpio15" at macgpio0 offset 0x67 not configured
> "escc-legacy" at macobio0 offset 0x12000 not configured
> zs0 at macobio0 offset 0x13000: irq 22,23
> zstty0 at zs0 channel 0
> zstty1 at zs0 channel 1
> snapper0 at macobio0 offset 0x1: irq 30,1,2
> "timer" at macobio0 offset 0x15000 not configured
> adb0 at macobio0 offset 0x16000: irq 25, via-pmu, 3 targets
> apm0 at adb0: battery flags 0x5, 0% charged
> piic0 at adb0
> iic1 at piic0
> akbd0 at adb0 addr 2: iBook keyboard with inverted T (ISO layout)
> wskbd0 at akbd0: console keyboard
> ams0 at adb0 addr 3: EMP trackpad  4-button, 400 dpi
> wsmouse0 at ams0 mux 0
> abtn0 at adb0 addr 7: brightness/volume/eject buttons
> "battery" at macobio0 offset 0x0 not configured
> "backlight" at macobio0 offset 0xf300 not configured
> kiic1 at macobio0 offset 0x18000
> iic2 at kiic1
> wdc0 at macobio0 offset 0x2 irq 24: DMA
> atapiscsi0 at wdc0 channel 0 drive 0
> scsibus1 at atapiscsi0: 2 targets
> cd0 at scsibus1 targ 0 lun 0:  ATAPI 5/cdrom 
> removable
> cd0(wdc0:0:0): using BIOS timings, DMA mode 2
> audio0 at snapper0
> bwi0 at pci1 dev 18 function 0 "Broadcom BCM4306

Re: Package update fails with permission errors

2016-02-20 Thread Juan Francisco Cantero Hurtado
On Sat, Feb 20, 2016 at 05:45:02PM -0500, Ежи рыбы wrote:
> Hi, When attempting to update packages with:# pkg_add -vui the update
> fails, with a series of error messages: Update candidates: [PKG] -> [PKG]
> Error from
> ftp://ftp5.usa.openbsd.org/pub/OpenBSD/snapshots/packages/amd64/[PKG].tgz
> ftp: /root/.netrc: Permission denied where [PKG] progresses through the
> queue of update candidates. Thanks  --( System Information )-- dmesg:

The command and the ftp mirror work for me.

Can you run "mv /root/.netrc /root/.netrc.backup" as root and try
again the update?

-- 
Juan Francisco Cantero Hurtado http://juanfra.info



Re: Package update fails with permission errors

2016-02-20 Thread Juan Francisco Cantero Hurtado
Can you copy-paste the full output of these commands?

"ftp ftp://ftp5.usa.openbsd.org/pub/OpenBSD/snapshots/packages/amd64/SHA256";

"id"

"env"

On Sat, Feb 20, 2016 at 08:11:56PM -0500, Ежи рыбы wrote:
> The /root/.netrc file does not appear to exist. 20.02.2016, 19:37, "Juan
> Francisco Cantero Hurtado" :
> 
>   On Sat, Feb 20, 2016 at 05:45:02PM -0500, Ежи рыбы wrote:
> 
>  Hi, When attempting to update packages with:# pkg_add -vui the
> update
>  fails, with a series of error messages: Update candidates: [PKG]
> -> [PKG]
>  Error from
>  ftp://ftp5.usa.openbsd.org/pub/OpenBSD/snapshots/packages/amd64/[PKG].tgz
>  ftp: /root/.netrc: Permission denied where [PKG] progresses
> through the
>  queue of update candidates. Thanks  --( System Information
> )-- dmesg:
> 
> 
>   The command and the ftp mirror work for me.
> 
>   Can you run "mv /root/.netrc /root/.netrc.backup" as root and try
>   again the update?
> 
>   --
>   Juan Francisco Cantero Hurtado http://juanfra.info

-- 
Juan Francisco Cantero Hurtado http://juanfra.info



Re: Package update fails with permission errors

2016-02-21 Thread Juan Francisco Cantero Hurtado
On Sun, Feb 21, 2016 at 01:06:37AM -0500, Ежи рыбы wrote:
> Ah, the update seems to run smoothly now. Should PKG_PATH supersede the
> settings in /etc/pkg.conf?

The command in your first report was run as root. Now you're running
every command as a regular user.

The http:// mirror doesn't fail because ftp is not trying to read the
netrc file.

> 
> Thanks
> 
> On 2/21/2016 12:16 AM, li...@wrant.com wrote:
> >Sat, 20 Feb 2016 22:59:59 -0500 Ежи рыбы 
> >>$ printenv PKG_PATH
> >>ftp://ftp5.usa.openbsd.org/pub/OpenBSD/snapshots/packages/amd64
> >>$ egrep -v '(^#|^$)' /etc/{,examples/}pkg.conf
> >>/etc/pkg.conf:installpath = 
> >>http://ftp5.usa.openbsd.org/pub/OpenBSD/%c/packages/%a/
> >
> >Try setting this in ~/.profile to match what you have in /etc/pkg.conf
> >
> >export 
> >PKG_PATH=http://ftp5.usa.openbsd.org/pub/OpenBSD/snapshots/packages/`arch 
> >-s`/
> >
> >NB: use plain text message to reply
> >
> >20.02.2016, 22:19, :
> >>
> >>>Sat, 20 Feb 2016 17:45:02 -0500 Ежи рыбы 
> >>>
> >>>When attempting to update packages with: # pkg_add -vui
> >>>the update fails, with a series of error messages
> >>>ftp: /root/.netrc: Permission denied
> >>
> >>1) What does this printenv(1) produce?
> >>
> >>$ printenv PKG_PATH
> >>
> >>2) What do you have in pkg.conf(5)?
> >>
> >>$ egrep -v '(^#|^$)' /etc/{,examples/}pkg.conf
> >>
> >>3) Compare this with the mirrors list:
> >>
> >>http://www.openbsd.org/ftp.html
> >>http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/www/build/mirrors.dat
> >>http://spacehopper.org/mirmon/
> >>
> >>4) Try ftp(1) connect manually with the results from 1) & 2) like
> >>this
> >>
> >>$ ftp -d \
> >>  ftp://ftp5.usa.openbsd.org/pub/OpenBSD/snapshots/packages/amd64/
> 

-- 
Juan Francisco Cantero Hurtado http://juanfra.info



PANIC: rw_enter: vmmaplk locking against myself (armv7 bsd.OMAP Sep 27)

2013-09-27 Thread Juan Francisco Cantero Hurtado
I've been using the last beagle snapshot for more than one month without
issues. Today, I've updated to armv7 OMAP using the last bsd.rd.OMAP.

It panics always when I run weechat. Copy/paste of the serial output
with ddb info:


U-Boot SPL 2013.04-dirty (Jun 19 2013 - 09:57:14)
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0 
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Peripheral mode controller at 47401000 using PIO, IRQ 0
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0 
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Host mode controller at 47401800 using PIO, IRQ 0
OMAP SD/MMC: 0
mmc_send_cmd : timeout: No status update
reading u-boot.img
reading u-boot.img


U-Boot 2013.04-dirty (Jun 19 2013 - 09:57:14)

I2C:   ready
DRAM:  512 MiB
WARNING: Caches not enabled
NAND:  No NAND device found!!!
0 MiB
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
*** Warning - readenv() failed, using default environment

musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0 
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Peripheral mode controller at 47401000 using PIO, IRQ 0
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0 
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Host mode controller at 47401800 using PIO, IRQ 0
Net:not set. Validating first E-fuse MAC
cpsw, usb_ether
Hit any key to stop autoboot:  0 
gpio: pin 53 (gpio 53) value is 1
mmc0 is current device
micro SD card found
mmc0 is current device
gpio: pin 54 (gpio 54) value is 1
SD/MMC found on device 0
reading uEnv.txt
151 bytes read in 3 ms (48.8 KiB/s)
Loaded environment from uEnv.txt
Importing environment from mmc ...
Running uenvcmd ...
reading bsd.umg
2831248 bytes read in 325 ms (8.3 MiB/s)
## Booting kernel from Legacy Image at 8280 ...
   Image Name:   boot
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:2831184 Bytes = 2.7 MiB
   Load Address: 8030
   Entry Point:  8030
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...


OpenBSD/beagle booting ...
arg0 0x0 arg1 0xe05 arg2 0x8100
atag core flags 0 pagesize 0 rootdev 0
atag cmdline [sd0i:/bsd.umg]
atag mem start 0x8000 size 0x2000
bootfile: sd0i:/bsd.umg
bootargs: 
memory size derived from u-boot
bootconf.mem[0].address = 8000 pages 131072/0x2000
Allocating page tables
freestart = 0x8062a000, free_pages = 129494 (0x0001f9d6)
IRQ stack: p0x80658000 v0xc0658000
ABT stack: p0x80659000 v0xc0659000
UND stack: p0x8065a000 v0xc065a000
SVC stack: p0x8065b000 v0xc065b000
Creating L1 page table at 0x8062c000
Mapping kernel
Constructing L2 page tables
undefined page pmap [ no symbol table formats found ]
board type: beaglebone
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California.  All rights reserved.
Copyright (c) 1995-2013 OpenBSD. All rights reserved.  http://www.OpenBSD.org

OpenBSD 5.4-current (GENERIC-OMAP) #6: Mon Sep 16 01:42:55 CEST 2013
r...@imx.fritz.box:/usr/src/sys/arch/armv7/compile/GENERIC-OMAP
real mem  = 536870912 (512MB)
avail mem = 519208960 (495MB)
mainbus0 at root
cpu0 at mainbus0: ARM Cortex A8 R3 rev 2 (ARMv7 core)
cpu0: DC enabled IC enabled WB disabled EABT branch prediction enabled
cpu0: 32KB(64b/l,4way) I-cache, 32KB(64b/l,4way) wr-back D-cache
omap0 at mainbus0: BeagleBone
prcm0 at omap0 rev 0.2
sitaracm0 at omap0: control module, rev 1.0
intc0 at omap0 rev 5.0
dmtimer0 at omap0 rev 3.1
dmtimer1 at omap0 rev 3.1
omdog0 at omap0 rev 0.1
ommmc0 at omap0
sdmmc0 at ommmc0
ommmc1 at omap0
sdmmc1 at ommmc1
com0 at omap0: ti16750, 64 byte fifo
com0: console
cpsw0 at omap0: version 1.12 (0), address 90:59:af:5c:b3:9b
ukphy0 at cpsw0 phy 0: Generic IEEE 802.3u media interface, rev. 1: OUI 
0x0001f0, model 0x000f
/dev/ksyms: Symbol table not valid.
scsibus0 at sdmmc0: 2 targets, initiator 0
sd0 at scsibus0 targ 1 lun 0:  SCSI2 0/direct fixed
sd0: 7535MB, 512 bytes/sector, 15431680 sectors
scsibus1 at sdmmc1: 2 targets, initiator 0
sd1 at scsibus1 targ 1 lun 0:  SCSI2 0/direct fixed
sd1: 1832MB, 512 bytes/sector, 3751936 sectors
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
boot device: sd0
root on sd0a (f43d8b62d65ddce7.a) swap on sd0b dump on sd0b
WARNING: / was not properly unmounted
WARNING: CHECK AND RESET THE DATE!
Automatic boot in progress: starting file system checks.
/dev/sd0a (f43d8b62d65ddce7.a): INCORRECT BLOCK COUNT I=779551 (4 should be 0) 
(CORRECTED)
/dev/sd0a (f43d8b62d65ddce7.a): UNREF FILE I=779551  OWNER=juanfra MODE=100600
/dev/sd0a: SIZE=0 MTIME=Sep 27 23:28 2013  (CLEARED)
/dev/sd0a (f43d8b62d65ddce7.a): LINK COUNT FILE I=779613

Re: Random freeze with Thinkpad R400 (7UET46WW)

2013-10-21 Thread Juan Francisco Cantero Hurtado
On Sun, Oct 20, 2013 at 05:32:03PM +0200, Antoine Jacoutot wrote:
> On Sun, Oct 20, 2013 at 02:56:52PM +0100, Stuart Henderson wrote:
> > On 2013/10/20 15:36, BESSOT Jean-Michel wrote:
> > > Hello
> > > 
> > > There is some freeze on Thinkpad R400 in current and they do seem
> > > random. It runs well for hours or, sometimes, it just freeze in the
> > > first hour after a boot or a resume. I have no Idea on how to trigger it
> > > at will.
> > 
> > Do you use apmd, especially with any auto-speed-changing flags? If so,
> > try disabling it - either run it with no flags, or don't run it completely -
> > one or other of these has fixed hangs for several people.
> 
> Don't run it at all. It will not fix your hangs but migitate them by a huge 
> amount.
> 

I only see hangs with GENERIC.MP. I've no problems with GENERIC. Maybe
this helps to other users.

-- 
Juan Francisco Cantero Hurtado http://juanfra.info



Logitech Comfort Keyboard K290. usbhidctl/usbhidaction doesn't work.

2013-11-20 Thread Juan Francisco Cantero Hurtado
escriptorType 5
bEndpointAddress 0x81  EP 1 IN
bmAttributes3
  Transfer TypeInterrupt
  Synch Type   None
  Usage Type   Data
wMaxPacketSize 0x0008  1x 8 bytes
bInterval 255
Hub Descriptor:
  bLength  11
  bDescriptorType  41
  nNbrPorts 5
  wHubCharacteristic 0x
Ganged power switching
Ganged overcurrent protection
  bPwrOn2PwrGood2 * 2 milli seconds
  bHubContrCurrent  0 milli Ampere
  DeviceRemovable0x00
  PortPwrCtrlMask0x00
 Hub Port Status:
   Port 1: .0100 power
   Port 2: .0100 power
   Port 3: .0100 power
   Port 4: .0100 power
   Port 5: .0100 power
Device Status: 0x0001
  Self Powered

Bus 005 Device 001: ID 1022: Shinko Shoji Co., Ltd 
Device Descriptor:
  bLength18
  bDescriptorType 1
  bcdUSB   1.00
  bDeviceClass9 Hub
  bDeviceSubClass 0 Unused
  bDeviceProtocol 0 Full speed (or root) hub
  bMaxPacketSize064
  idVendor   0x1022 Shinko Shoji Co., Ltd
  idProduct  0x 
  bcdDevice1.00
  iManufacturer   1 AMD
  iProduct2 OHCI root hub
  iSerial 0 
  bNumConfigurations  1
  Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength   25
bNumInterfaces  1
bConfigurationValue 1
iConfiguration  0 
bmAttributes 0x40
  (Missing must-be-set bit!)
  Self Powered
MaxPower0mA
Interface Descriptor:
  bLength 9
  bDescriptorType 4
  bInterfaceNumber0
  bAlternateSetting   0
  bNumEndpoints   1
  bInterfaceClass 9 Hub
  bInterfaceSubClass  0 Unused
  bInterfaceProtocol  0 Full speed (or root) hub
  iInterface  0 
  Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81  EP 1 IN
bmAttributes3
  Transfer TypeInterrupt
  Synch Type   None
  Usage Type   Data
wMaxPacketSize 0x0008  1x 8 bytes
bInterval 255
Hub Descriptor:
  bLength  11
  bDescriptorType  41
  nNbrPorts 2
  wHubCharacteristic 0x
Ganged power switching
Ganged overcurrent protection
  bPwrOn2PwrGood2 * 2 milli seconds
  bHubContrCurrent  0 milli Ampere
  DeviceRemovable0x00
  PortPwrCtrlMask0x00
 Hub Port Status:
   Port 1: .0100 power
   Port 2: .0100 power
Device Status: 0x0001
  Self Powered

Bus 006 Device 001: ID 1022: Shinko Shoji Co., Ltd 
Device Descriptor:
  bLength18
  bDescriptorType 1
  bcdUSB   1.00
  bDeviceClass9 Hub
  bDeviceSubClass 0 Unused
  bDeviceProtocol 0 Full speed (or root) hub
  bMaxPacketSize064
  idVendor   0x1022 Shinko Shoji Co., Ltd
  idProduct  0x 
  bcdDevice1.00
  iManufacturer   1 AMD
  iProduct2 OHCI root hub
  iSerial 0 
  bNumConfigurations  1
  Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength   25
bNumInterfaces  1
bConfigurationValue 1
iConfiguration  0 
bmAttributes 0x40
  (Missing must-be-set bit!)
  Self Powered
MaxPower0mA
Interface Descriptor:
  bLength 9
  bDescriptorType 4
  bInterfaceNumber0
  bAlternateSetting   0
  bNumEndpoints   1
  bInterfaceClass 9 Hub
  bInterfaceSubClass  0 Unused
  bInterfaceProtocol  0 Full speed (or root) hub
  iInterface  0 
  Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81  EP 1 IN
bmAttributes3
  Transfer TypeInterrupt
  Synch Type   None
  Usage Type   Data
wMaxPacketSize 0x0008  1x 8 bytes
bInterval 255
Hub Descriptor:
  bLength  11
  bDescriptorType  41
  nNbrPorts     4
  wHubCharacteristic 0x
Ganged power switching
Ganged overcurrent protection
  bPwrOn2PwrGood2 * 2 milli seconds
  bHubContrCurrent  0 milli Ampere
  DeviceRemovable0x00
  PortPwrCtrlMask0x00
 Hub Port Status:
   Port 1: .0100 power
   Port 2: .0100 power
   Port 3: .0100 power
   Port 4: .0100 power
Device Status: 0x0001
  Self Powered

-- 
Juan Francisco Cantero Hurtado http://juanfra.info



Re: Logitech Comfort Keyboard K290. usbhidctl/usbhidaction doesn't work.

2013-11-21 Thread Juan Francisco Cantero Hurtado
On Thu, Nov 21, 2013 at 11:02:46AM +0100, Martin Pieuchot wrote:
> Hi Juan,
> 
> On 21/11/13(Thu) 03:01, Juan Francisco Cantero Hurtado wrote:
> > http://www.logitech.com/es-es/product/comfort-keyboard-k290?crid=26
> > http://i.imgur.com/ZV1GLDt.jpg
> > 
> > The keyboard has two annoying problems:
> > - usbhidctl doesn't work. The biggest problem for me.
> > - Linux and Windows has programs to swap the functionality of the
> >   function keys (F1,F2...) and the windows quick access keys.  In this
> >   keyboard, you need to push the FN key to use the traditional F keys
> >   (F1, F2...). The keyboard has an internal functionality to swap this
> >   annoying behavior, it only need to receive the correct message from
> >   the OS.
> > 
> > I'm really interested in the fix for usbhidctl/uhidaction but it would
> > nice if someone can adapt the linux programs to OpenBSD to swap the Fn
> > keys.
> >
> > [...]
> > uhidev0 at uhub3 port 2 configuration 1 interface 0 "Logitech USB Keyboard" 
> > rev 1.10/87.00 addr 2
> > uhidev0: iclass 3/1
> > ukbd0 at uhidev0: 8 variable keys, 6 key codes
> > wskbd1 at ukbd0 mux 1
> > uhidev1 at uhub3 port 2 configuration 1 interface 1 "Logitech USB Keyboard" 
> > rev 1.10/87.00 addr 2
> > uhidev1: iclass 3/0, 5 report ids
> > uhid0 at uhidev1 reportid 3: input=2, output=0, feature=0
> > uhid1 at uhidev1 reportid 4: input=1, output=0, feature=0
> > uhid2 at uhidev1 reportid 5: input=0, output=0, feature=5
> 
> It might be a bit confusing, but your keyboard is attached as two
> uhidev(4) devices.  Only the first one ``uhidev0'' is recognized as
> a keyboard.  Have you tried usbhidctl(1) on its node: /dev/wskbd1 ?

No. I always used "/dev/uhid1" with my last USB keyboard.

The output of usbhidctl with wskbd1:

Keyboard.Keyboard_LeftControl=0
Keyboard.Keyboard_LeftShift=0
Keyboard.Keyboard_LeftAlt=0
Keyboard.Keyboard_Left_GUI=0
Keyboard.Keyboard_RightControl=0
Keyboard.Keyboard_RightShift=0
Keyboard.Keyboard_RightAlt=0
Keyboard.Keyboard_Right_GUI=0
Keyboard.Num_Lock=0
Keyboard.Caps_Lock=0
Keyboard.Scroll_Lock=0
Keyboard.No_Event=1 [0]
Keyboard.No_Event=1 [1]
Keyboard.No_Event=1 [2]
Keyboard.No_Event=1 [3]
Keyboard.No_Event=1 [4]
Keyboard.No_Event=1 [5]


Report descriptor:
Collection page=Generic_Desktop usage=Keyboard
Input   size=1 count=1 page=Keyboard usage=Keyboard_LeftControl, logical range 
0..1
Input   size=1 count=1 page=Keyboard usage=Keyboard_LeftShift, logical range 
0..1
Input   size=1 count=1 page=Keyboard usage=Keyboard_LeftAlt, logical range 0..1
Input   size=1 count=1 page=Keyboard usage=Keyboard_Left_GUI, logical range 0..1
Input   size=1 count=1 page=Keyboard usage=Keyboard_RightControl, logical range 
0..1
Input   size=1 count=1 page=Keyboard usage=Keyboard_RightShift, logical range 
0..1
Input   size=1 count=1 page=Keyboard usage=Keyboard_RightAlt, logical range 0..1
Input   size=1 count=1 page=Keyboard usage=Keyboard_Right_GUI, logical range 
0..1
Output  size=1 count=1 page=LEDs usage=Num_Lock, logical range 0..1
Output  size=1 count=1 page=LEDs usage=Caps_Lock, logical range 0..1
Output  size=1 count=1 page=LEDs usage=Scroll_Lock, logical range 0..1
Input   size=8 count=6 Array page=Keyboard usage=No_Event..0x00ff, logical 
range 0..255
End collection
Total   input size 8 bytes
Total  output size 1 bytes
Total feature size 0 bytes

> 
> The code needed to swap the F keys is no really complicated to do and
> I guess you can do it.
> 
> The idea is to send a magic sequence to the device, there's a lot of
> code doing that in others drivers.  You can take a look at how ugold(4)
> issues its command or how ukbd(4) blinks its LEDs.

I'll take a look. Thanks!.

> 
> All you need to do is match your keyboard by vendor & product in
> ukbd_attach() and send the reversed engineered command that toggle the
> key swapping.  
> 
> Please don't hesitate to contact me if you need more help.

Probably I will.

-- 
Juan Francisco Cantero Hurtado http://juanfra.info



Re: X fails on Macbook with 6.1 snap

2017-04-01 Thread Juan Francisco Cantero Hurtado
On Sat, Apr 01, 2017 at 12:49:35PM -0700, Philip Guenther wrote:
> >Synopsis:X fails on Macbook with 6.1 snap
> >Category:system
> >Environment:
>   System  : OpenBSD 6.1
>   Details : OpenBSD 6.1 (GENERIC) #2: Fri Mar 31 00:00:16 MDT 2017
>
> dera...@macppc.openbsd.org:/usr/src/sys/arch/macppc/compile/GENERIC
> 
>   Architecture: OpenBSD.macppc
>   Machine : macppc
> >Description:
>   On running xinit, X tries to start but fails
> >How-To-Repeat:
>   xinit
> >Fix:
>   none

Just in case someone finds this info useful, X runs fine on my PowerBook
7457 with an ATI card.


-- 
Juan Francisco Cantero Hurtado http://juanfra.info



Re: panic: Stopped at kqueue_scan

2017-07-06 Thread Juan Francisco Cantero Hurtado
On Thu, Jul 06, 2017 at 08:29:39AM -0600, Aaron Bieber wrote:
> Hola,
> 
> For roughly a week I have been able to reliably produce panics on
> amd64 (virtual machine and physical machine) using disk IO heavy
> applications (gitea, syncthing).
> 
> Unfortunately on the physical machine - the one I can reliably panic
> within < 1 minute - I don't have a serial console, so here are links
> to photos:
> 
> https://goo.gl/photos/Z8g225UXXpCXQpGcA
> mirror/google averse: https://deftly.net/panic-2017-07-06/
> 
> Also with machdep.forceukbd=1, once I ran `mach ddbcpu 0`, every
> subsequent key press puked out an "splassert" line, I attempted to run
> a "trace" again, but things seemed to be completely locked up after that.

I'm seeing the same panic but I can't run ddb. Also with syncthing.


-- 
Juan Francisco Cantero Hurtado http://juanfra.info



Re: panic: Stopped at kqueue_scan

2017-07-07 Thread Juan Francisco Cantero Hurtado
On Fri, Jul 07, 2017 at 12:51:05PM +0200, Martin Pieuchot wrote:
> On 06/07/17(Thu) 21:18, Juan Francisco Cantero Hurtado wrote:
> > On Thu, Jul 06, 2017 at 08:29:39AM -0600, Aaron Bieber wrote:
> > > Hola,
> > > 
> > > For roughly a week I have been able to reliably produce panics on
> > > amd64 (virtual machine and physical machine) using disk IO heavy
> > > applications (gitea, syncthing).
> > > 
> > > Unfortunately on the physical machine - the one I can reliably panic
> > > within < 1 minute - I don't have a serial console, so here are links
> > > to photos:
> > > 
> > > https://goo.gl/photos/Z8g225UXXpCXQpGcA
> > > mirror/google averse: https://deftly.net/panic-2017-07-06/
> > > 
> > > Also with machdep.forceukbd=1, once I ran `mach ddbcpu 0`, every
> > > subsequent key press puked out an "splassert" line, I attempted to run
> > > a "trace" again, but things seemed to be completely locked up after that.
> > 
> > I'm seeing the same panic but I can't run ddb. Also with syncthing.
> 
> Here's a fix.  The problem certainly comes from a contented NET_LOCK()
> which means that we now have a sleeping point where we're not allowed
> to sleep.
> 
> Diff below revert the solock()/sounlock() dances in the kqueue filters,
> let me know if it works for you.

The kernel doesn't panic with your patch. Thanks!.

> 
> Index: kern/uipc_socket.c
> ===
> RCS file: /cvs/src/sys/kern/uipc_socket.c,v
> retrieving revision 1.192
> diff -u -p -r1.192 uipc_socket.c
> --- kern/uipc_socket.c4 Jul 2017 12:58:32 -   1.192
> +++ kern/uipc_socket.c7 Jul 2017 10:46:40 -
> @@ -1998,10 +1998,8 @@ int
>  filt_sowrite(struct knote *kn, long hint)
>  {
>   struct socket *so = kn->kn_fp->f_data;
> - int s, rv;
> + int rv;
>  
> - if (!(hint & NOTE_SUBMIT))
> - s = solock(so);
>   kn->kn_data = sbspace(so, &so->so_snd);
>   if (so->so_state & SS_CANTSENDMORE) {
>   kn->kn_flags |= EV_EOF;
> @@ -2017,8 +2015,6 @@ filt_sowrite(struct knote *kn, long hint
>   } else {
>   rv = (kn->kn_data >= so->so_snd.sb_lowat);
>   }
> - if (!(hint & NOTE_SUBMIT))
> - sounlock(s);
>  
>   return (rv);
>  }
> @@ -2027,13 +2023,8 @@ int
>  filt_solisten(struct knote *kn, long hint)
>  {
>   struct socket *so = kn->kn_fp->f_data;
> - int s;
>  
> - if (!(hint & NOTE_SUBMIT))
> - s = solock(so);
>   kn->kn_data = so->so_qlen;
> - if (!(hint & NOTE_SUBMIT))
> - sounlock(s);
>  
>   return (kn->kn_data != 0);
>  }
> Index: miscfs/fifofs/fifo_vnops.c
> ===
> RCS file: /cvs/src/sys/miscfs/fifofs/fifo_vnops.c,v
> retrieving revision 1.56
> diff -u -p -r1.56 fifo_vnops.c
> --- miscfs/fifofs/fifo_vnops.c3 Jul 2017 08:31:39 -   1.56
> +++ miscfs/fifofs/fifo_vnops.c7 Jul 2017 10:46:57 -
> @@ -531,10 +531,8 @@ int
>  filt_fiforead(struct knote *kn, long hint)
>  {
>   struct socket *so = (struct socket *)kn->kn_hook;
> - int s, rv;
> + int rv;
>  
> - if (!(hint & NOTE_SUBMIT))
> - s = solock(so);
>   kn->kn_data = so->so_rcv.sb_cc;
>   if (so->so_state & SS_CANTRCVMORE) {
>   kn->kn_flags |= EV_EOF;
> @@ -543,8 +541,6 @@ filt_fiforead(struct knote *kn, long hin
>   kn->kn_flags &= ~EV_EOF;
>   rv = (kn->kn_data > 0);
>   }
> - if (!(hint & NOTE_SUBMIT))
> - sounlock(s);
>  
>   return (rv);
>  }
> @@ -563,10 +559,8 @@ int
>  filt_fifowrite(struct knote *kn, long hint)
>  {
>   struct socket *so = (struct socket *)kn->kn_hook;
> - int s, rv;
> + int rv;
>  
> - if (!(hint & NOTE_SUBMIT))
> - s = solock(so);
>   kn->kn_data = sbspace(so, &so->so_snd);
>   if (so->so_state & SS_CANTSENDMORE) {
>   kn->kn_flags |= EV_EOF;
> @@ -575,8 +569,6 @@ filt_fifowrite(struct knote *kn, long hi
>   kn->kn_flags &= ~EV_EOF;
>   rv = (kn->kn_data >= so->so_snd.sb_lowat);
>   }
> - if (!(hint & NOTE_SUBMIT))
> - sounlock(s);
>  
>   return (rv);
>  }
> Index: sys/socketvar.h
> ===
> RCS file: /cvs/src/sys/sys/socketvar.h,v
> retrieving revision 1.72
> diff -u -p -r1.72 socketvar.h
> --- sys/socketvar.h   4 Jul 2017 12:58:32 -   1.72
> +++ sys/socketvar.h   7 Jul 2017 10:46:32 -
> @@ -186,7 +186,10 @@ static inline long
>  sbspace(struct socket *so, struct sockbuf *sb)
>  {
>   KASSERT(sb == &so->so_rcv || sb == &so->so_snd);
> +#if 0
> + /* XXXSMP kqueue_scan() calling filt_sowrite() cannot sleep. */
>   soassertlocked(so);
> +#endif
>   return lmin(sb->sb_hiwat - sb->sb_cc, sb->sb_mbmax - sb->sb_mbcnt);
>  }
>  
> 

-- 
Juan Francisco Cantero Hurtado http://juanfra.info