Trying wineconsole julia.exe
will open up julia, but no input can be entered. I'm in the process of investigating this.
Is that a new issue? I don't remember that ever working. (it seemed wine never delivered the write notification?)
Yes it worked ~3 months ago.
this has never worked for me either in my recollection. keno-only functionality.
Unsurprising backtrace, but seems to match the theory of a missing write notification:
Stopped in function _raw_syscall
0x00007f6ce393b446<+33>: movq $582, %r11
0x00007f6ce393b44d<+40>: movq $-1, %rcx
=> 0x00007f6ce393b454<+47>: callq *32(%rsp)
0x00007f6ce393b458<+51>: xorl %ecx, %ecx
0x00007f6ce393b45a<+53>: movq $-1, %rcx
1|debug > bt
[1] _raw_syscall
[2] untraced_syscall_base
[3] syscall_hook
[4] _syscall_hook_trampoline
[5] _syscall_hook_trampoline_48_8b_3c_24
[6] __libc_read
[9] wait_objects
[10] NtWaitForSingleObject
[11] NtRemoveIoCompletion
[12] GetQueuedCompletionStatus
[13] uv_poll
[14] uv_run
[15] julia_process_events_19234
[16] julia_wait_19231
[17] julia_wait_19230
[18] julia_wait_readnb_19467
[19] julia_eof_19458
[20] julia_match_input_19457
[21] jlcall_match_input_19457
[22] jl_apply_generic
[23] julia_match_input_19454
[24] jlcall_match_input_19454
[25] jl_apply_generic
[26] julia_prompt!_19511
[27] julia_run_interface_19620
[28] jlcall_run_interface_19620
[29] jl_apply_generic
[30] julia_run_frontend_19922
Current state of investigation (mostly for personal reference):
At or about e711551
, julia registers a wait on the console handle object:
1|debug > bt
[1] pthread_sigmask
[2] wine_server_call
[3] NtCreateEvent
[4] RtlRegisterWait
[5] RegisterWaitForSingleObject
[6] uv_tty_queue_read_raw at /home/Administrator/buildbot/slave/package_win6_2-x64/build/deps/srccache/libuv-cb6d0f875a5b8ca30cba45c0c1ef7442c87c1e68/src/win/tty.c:387
[7] uv_tty_queue_read at /home/Administrator/buildbot/slave/package_win6_2-x64/build/deps/srccache/libuv-cb6d0f875a5b8ca30cba45c0c1ef7442c87c1e68/src/win/tty.c:511
[8] uv_tty_read_start at /home/Administrator/buildbot/slave/package_win6_2-x64/build/deps/srccache/libuv-cb6d0f875a5b8ca30cba45c0c1ef7442c87c1e68/src/win/tty.c:943
[9] uv_read_start at /home/Administrator/buildbot/slave/package_win6_2-x64/build/deps/srccache/libuv-cb6d0f875a5b8ca30cba45c0c1ef7442c87c1e68/src/win/stream.c:89
[10] julia_start_reading_19469 at /root/julia/usr/bin/../share/julia/base/stream.jl:684
Later, at e871514
, wineconsole
reads one byte from STDIN
1|debug > bt
[1] __libc_read
[2] wgetch
[3] wgetch
[4] input_thread at ../../../wine/programs/wineconsole/curses.c:960
[5] call_thread_func_wrapper
[6] call_thread_func
[7] call_thread_entry_point
[8] start_thread
[9] thread_trampoline
[10] start_thread
and hands it off to wine server shortly afterwards at e871516
:
1|debug > bt
[1] pthread_sigmask
[2] wine_server_call
[3] WriteConsoleInputW
[4] input_thread at ../../../wine/programs/wineconsole/curses.c:969
[5] call_thread_func_wrapper
[6] call_thread_func
[7] call_thread_entry_point
[8] start_thread
[9] thread_trampoline
[10] start_thread
[11] llseek
I don't believe I have seen uv_tty_post_raw_read
get posted, so looks like the wine server is losing the notification.
Or alternatively, there's a bug in the thread pool implementation.
Thread pool seems fine:
1|debug > bt
[1] NtWaitForMultipleObjects
[2] wait_thread_proc
[3] process_rtl_work_item
[4] threadpool_worker_proc
[5] call_thread_func
[6] call_thread_entry_point
[7] start_thread
[8] start_thread
[9] llseek
1|debug > when
Ticks: 0x00000000000011a3
Time: 711862
Ok, looks like wine doesn't have support for waiting on the console:
static const struct object_ops console_input_ops =
{
sizeof(struct console_input), /* size */
console_input_dump, /* dump */
no_get_type, /* get_type */
no_add_queue, /* add_queue */
NULL, /* remove_queue */
NULL, /* signaled */
no_satisfied, /* satisfied */
no_signal, /* signal */
console_input_get_fd, /* get_fd */
default_fd_map_access, /* map_access */
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
no_close_handle, /* close_handle */
console_input_destroy /* destroy */
};
Should be easy enough to fix, though the question is why we didn't get an appropriate error message.
Patch submitted upstream: https://source.winehq.org/patches/data/125655
Console Input works now, but looks like there's another issue right after:
Oh well, I'll look at it and file a separate issue.
Committed upstream as https://github.com/wine-mirror/wine/commit/ccc1d346a6cd4f2d12b6ce1c2f6bdcd92f8a0bf3 and released as part of Wine 1.9.17.
We should give Wine a "best upstream" award.
Yes
Wow, that is impressive turnaround time. Way to go, Wine.
Most helpful comment
We should give Wine a "best upstream" award.