hstr icon indicating copy to clipboard operation
hstr copied to clipboard

Radix sort overflow on raspberry pi

Open benalb opened this issue 11 years ago • 10 comments

Installed on raspberry pi, via git, make, make install.

pi@tartaro:$ uname -a Linux tartaro 3.12.35+ #730 PREEMPT Fri Dec 19 18:31:24 GMT 2014 armv6l GNU/Linux pi@tartaro:$ hh WARNING: Radix sort overflow - inserted key is bigger than limit (500000): 2147483648

benalb avatar Jan 01 '15 11:01 benalb

This is a protection mechanism which ensures that program exits by default. However, there is an option to simply skip such keys (currently configurable just from source code - you may change:

rs->optIgnoreBigKeys=false

to

rs->optIgnoreBigKeys=true

in radixsort.c. However, I will make this behavior configurable and skip such keys by default.

It would help if you send me output of wc -lL (or history file (to my mail) so that I can reproduce the problem). Thanks!

dvorka avatar Jan 04 '15 13:01 dvorka

As I managed to destroy my raspi I can't reproduce the problem, nor send you the output. I'm sorry, and hope to get a new raspi in a couple of weeks.

2015-01-04 14:14 GMT+01:00 dvorka [email protected]:

This is a protection mechanism which ensures that program exits by default. However, there is an option to simply skip such keys (currently configurable just from source code - you may change:

rs->optIgnoreBigKeys=false

to

rs->optIgnoreBigKeys=false

in radixsort.c. However, I will make this behavior configurable and skip such keys by default.

It would help if you send me output of wc -lL (or history file (to my mail) so that I can reproduce the problem). Thanks!

— Reply to this email directly or view it on GitHub https://github.com/dvorka/hstr/issues/107#issuecomment-68632438.

signature: work in progress

benalb avatar Jan 04 '15 20:01 benalb

Thank you anyway!

I will do modifications (parameter allowing to skip keys that overflow + warning suggesting to use that parameter) and close.

dvorka avatar Jan 04 '15 21:01 dvorka

This problem still rears its ugly head on a 32 bit MIPS platform. As a result, only cursor keys seem to work; letters do not move the cursor forward as expected (this is the case on other platforms). GCC is 5.4, platform is Openwrt 17.01 running on a MIPS 74Kc architecture. More than happy to provide more details as required; just let me know.

chrisAtRedisLabs avatar Aug 02 '18 07:08 chrisAtRedisLabs

Unfortunately NOT reproducible on Debian 9.5 32b (both master and fixed (un)signed warnings branch tested). Tested on history file w/ ~400.000 entries, one line >800.000 chars, three lines >30.000 chars.

dvorka avatar Aug 10 '18 19:08 dvorka

Solution found by code-review - debug level was not initialized (therefore not reproducible as e.g. optimizations level may change behavior).

dvorka avatar Aug 10 '18 19:08 dvorka

Debug output's gone, but the other symptom remains: Only cursor keys work, letters never mind control keys (such as ctrl-e to enter regex search mode) don't. Should I open a new issue for this?

monochromec avatar Aug 13 '18 05:08 monochromec

Let me reopen it. To fix this one I will need to install an emulator as I'm not able to reproduce this bug.

dvorka avatar Aug 13 '18 08:08 dvorka

See also #68 - number of fixes in radixsort memory management.

dvorka avatar Aug 20 '18 17:08 dvorka

Issue of only cursor keys working remains on latest github version. I will open a new issue.

monochromec avatar Aug 21 '18 08:08 monochromec