Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Random crashes on OpenBSD #1

Closed
bentley opened this issue Feb 3, 2013 · 6 comments
Closed

Random crashes on OpenBSD #1

bentley opened this issue Feb 3, 2013 · 6 comments

Comments

@bentley
Copy link
Collaborator

bentley commented Feb 3, 2013

I use this version of nvi exclusively. It is great. But there is a bug somewhere that causes occasional, seemingly random, segfaults on OpenBSD amd64. I haven’t noticed a pattern—it happens with 150000-line assembly files or ten-line emails.

Here is a backtrace from the latest coredump:

#0  seq_find (sp=0x1391dec5ad78, lastqp=0x0, e_input=0x1391e476d000, 
    c_input=0x0, ilen=2, stype=SEQ_INPUT, ispartialp=0x7f7ffffca41c)
    at /usr/ports/pobj/nvi-2.1.1-iconv/nvi-2.1.1/common/seq.c:236
#1  0x0000138fdc114537 in v_event_get (sp=0x1391eae0f630, argp=0x7f7ffffca880, 
    timeout=600, flags=4)
    at /usr/ports/pobj/nvi-2.1.1-iconv/nvi-2.1.1/common/key.c:646
#2  0x0000138fdc142c09 in v_txt (sp=0x1391eae0f630, vp=0x7f7ffffcaac0, tm=Variable "tm" is not available.
)
    at /usr/ports/pobj/nvi-2.1.1-iconv/nvi-2.1.1/vi/v_txt.c:480
#3  0x0000138fdc13c867 in v_change (sp=0x1391eae0f630, vp=0x7f7ffffcaac0)
    at /usr/ports/pobj/nvi-2.1.1-iconv/nvi-2.1.1/vi/v_itxt.c:314
#4  0x0000138fdc148531 in vi (spp=0x7f7ffffcacd8)
    at /usr/ports/pobj/nvi-2.1.1-iconv/nvi-2.1.1/vi/vi.c:229
#5  0x0000138fdc11773a in editor (gp=0x1391e76b7000, argc=2, 
    argv=0x7f7ffffcaed0)
    at /usr/ports/pobj/nvi-2.1.1-iconv/nvi-2.1.1/common/main.c:421
#6  0x0000138fdc10d4d1 in main (argc=2, argv=0x7f7ffffcaec8)
    at /usr/ports/pobj/nvi-2.1.1-iconv/nvi-2.1.1/cl/cl_main.c:120
@lichray
Copy link
Owner

lichray commented Feb 3, 2013

On Sat, Feb 2, 2013 at 11:18 PM, Anthony J. Bentley <
notifications@github.com> wrote:

Here is a backtrace from the latest coredump:

#0 seq_find (sp=0x1391dec5ad78, lastqp=0x0, e_input=0x1391e476d000,
c_input=0x0, ilen=2, stype=SEQ_INPUT, ispartialp=0x7f7ffffca41c)
at /usr/ports/pobj/nvi-2.1.1-iconv/nvi-2.1.1/common/seq.c:236

Thanks for the backtrack. So you're inputting a key sequence with
a length of 2, and I'm wondering what that this. Can you give me a
list of your mapped keys or a :map list? Thank you.

Zhihao Yuan, ID lichray
The best way to predict the future is to invent it.


4BSD -- http://4bsd.biz/

@bentley
Copy link
Collaborator Author

bentley commented Feb 3, 2013

I don't remember typing any weird keys. Here's the output of :map.

^[OA  k     cursor up
^[OB  j     cursor down
^[OC  l     cursor right
^[OD  h     cursor left
^[OF  $     go to eol
^[OH  ^     go to sol
^[[1;2A     ^U    scroll up
^[[1;2B     ^D    scroll down
^[[2~ i     insert at cursor
^[[3~ x     delete character
^[[5~ ^B    page up
^[[6~ ^F    page down

yamt referenced this issue in yamt/nvi2 Mar 18, 2013
because:
- CLOCK_READTIME is a natural choice here.
- CLOCK_PROF seems less portable.
@bentley
Copy link
Collaborator Author

bentley commented May 14, 2013

Here is a mailing list post possibly about the same bug. Starts here:

http://marc.info/?l=openbsd-tech&m=136794306617877&w=2

Most recent patch is in this mail:

http://marc.info/?l=openbsd-tech&m=136838154213955&w=2

@lichray
Copy link
Owner

lichray commented May 14, 2013

On Tue, May 14, 2013 at 12:14 AM, Anthony J. Bentley <
notifications@github.com> wrote:

Here is a mailing list post possibly about the same bug. Starts here:

I... don't think they are the same issue, since the problem shown
in the mailing list is on a higher level of nvi's abstraction. But
thanks for the information. I'd better to subscribe OpenBSD
mailing list as well :)

Zhihao Yuan, ID lichray
The best way to predict the future is to invent it.


4BSD -- http://4bsd.biz/

@lichray
Copy link
Owner

lichray commented Mar 31, 2015

@bentley Does this issue still happen? If so, is there any pattern of the last key combination you entered and/or in which mode?

@bentley
Copy link
Collaborator Author

bentley commented Mar 31, 2015

Hasn’t happened in recent memory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants