Possible bug: anyone know what "WARNING: Caught an exception in the keymap:" means?


#1
julia> "Páll" == String(b"P\e1ll")
false

julia> String(b"P\e1ll")[1]
'P'

julia> String(b"P\e1ll")[2]
'\e'

julia> String(b"P\xe1ll")[2] # This one is also strange to me... should be "á"?
'૬'

shell> julia -e 'String(b"P\xe1ll")'

shell> julia -e 'println(String(b"P\xe1ll"))'
P�ll

julia> println(String(b"P\xe1ll"))
P�ll

julia> String(b"P\xe1ll")
"P૬"

julia> String(b"P\xe1ll") == "Páll" # I expected maybe true here.
WARNING: Caught an exception in the keymap:
ERROR: SystemError: flush: No space left on device
false

julia> "Páll" == String(b"P\xe1ll")
WARNING: Caught an exception in the keymap:
ERROR: SystemError: flush: No space left on device
false

julia> versioninfo()
WARNING: Caught an exception in the keymap:
ERROR: SystemError: flush: No space left on device
Julia Version 0.5.0
Commit 3c9d753 (2016-09-19 18:14 UTC)
Platform Info:
  System: Linux (x86_64-linux-gnu)
  CPU: Intel(R) Xeon(R) CPU E3-1245 v5 @ 3.50GHz
  WORD_SIZE: 64
  BLAS: libopenblas (NO_LAPACKE DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: liblapack.so.3
  LIBM: libopenlibm
  LLVM: libLLVM-3.7.1 (ORCJIT, broadwell)

I realize I just filled /home, assuming with Firefox activity, do not suspect Julia:

shell> df -h
WARNING: Caught an exception in the keymap:
ERROR: SystemError: flush: No space left on device
Filesystem      Size  Used Avail Use% Mounted on
udev            7,8G     0  7,8G   0% /dev
tmpfs           1,6G   42M  1,6G   3% /run
/dev/sda2        28G   11G   16G  41% /
tmpfs           7,8G  354M  7,5G   5% /dev/shm
tmpfs           5,0M  4,0K  5,0M   1% /run/lock
tmpfs           7,8G     0  7,8G   0% /sys/fs/cgroup
/dev/sda4        37G   35G     0 100% /home
cgmfs           100K     0  100K   0% /run/cgmanager/fs
tmpfs           1,6G  120K  1,6G   1% /run/user/1000

I thought it best to let you know, even with disk fulling up, I shouldn’t get string related errors?

I googles a bit, and found same WARNING, for other reasons:


#2

I’ve figured out the ERROR (but not exactly why I get the WARNING; I’m however no longer alarmed by it; but would still like to know what it means; it’s puzzling why it happens here, as opposed to the ERROR), it’s simply:

It must be because the REPL has to maintain the history file, but not when running directly (a better/clearer ERROR message, or that is WARNING, would be useful; or simply disabling it for the history file).

$ julia -e "versioninfo()"
Julia Version 0.5.0
Commit 3c9d753 (2016-09-19 18:14 UTC)
Platform Info:
  System: Linux (x86_64-linux-gnu)
  CPU: Intel(R) Xeon(R) CPU E3-1245 v5 @ 3.50GHz
  WORD_SIZE: 64
  BLAS: libopenblas (NO_LAPACKE DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: liblapack.so.3
  LIBM: libopenlibm
  LLVM: libLLVM-3.7.1 (ORCJIT, broadwell)
qwerty@qwerty:~$ julia
               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.5.0 (2016-09-19 18:14 UTC)
 _/ |\__'_|_|_|\__'_|  |  
|__/                   |  x86_64-linux-gnu

julia> versioninfo()
WARNING: Caught an exception in the keymap:
ERROR: SystemError: flush: No space left on device
Julia Version 0.5.0
Commit 3c9d753 (2016-09-19 18:14 UTC)
Platform Info:
  System: Linux (x86_64-linux-gnu)
  CPU: Intel(R) Xeon(R) CPU E3-1245 v5 @ 3.50GHz
  WORD_SIZE: 64
  BLAS: libopenblas (NO_LAPACKE DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: liblapack.so.3
  LIBM: libopenlibm
  LLVM: libLLVM-3.7.1 (ORCJIT, broadwell)

#3

The warning is about the error (note the : at the end). I believe errors when saving history file, etc is infrequent enough and they are potentially important enough that we should not hide that warning by default. After all, something on your computer is very wrong and two lines of warning does not sound like very much for this problem. Since this is not really an internal error (it’s caused by the user and can be fixed by them) it would probably be more friendly to change to warning to not mention keymap and mention the history file instead.


#4

EDIT: I’m still a little curious what the WARNING means (at least if similar can happen in non-0.5).


Right, but when it happens, “keymap” is confusing. Would a (trivial) PR be ok for Julia 1.0 (since there’s a feature freeze in effect), or only for 1.x?

A PR may not be needed, I see the NOTICE text in 0.5 (but not on master):

Some files got moved around, and code changed; I assume this is not a problem on master, or maybe even on 0.6. Yes, I should upgrade… and not pushing for a backport [to 0.5].

I understand this now, but at least changing the WARNING, eventually, could reduce the noise in Discourse.