0

I have a strange problem I cannot solve on my own:

Using Delphi 10.3 Rio Enterprise, on Linux (I tried fresh installs of Ubuntu 16.04 and Ubuntu 18.04 Desktop and Ubuntu 18.04 Server with GUI in VMWare Player 15) PAServer crashes with I/O Error 11 every time I start debugging. I can pull the SDK and Delphi deploys all files correctly. But trying to run ends with the crash and Delphi complaining that GDB Server is no longer available. I can run the program on the Linux host by starting it manually (of course without debugging).

It does not depend on the user in Linux, it also happens as root. Also, a non graphic appliation crashes even on non GUI Ubuntu server, always with IO Error 11.

Debugging with PAServer works well on OSX, Android and Windows. I of course tried a dead simple one form project without content with the same results.

I traced the Delphi PAClient with ProcMon, no evidence on that side. Then I tracked the Linux process with strace, which gave me this output:

write(1, "Starting Platform Assistant Serv"..., 49Starting Platform Assistant Server on port 64211
) = 49
write(1, "\n", 1
)                       = 1
write(1, "Type ? for available commands\n", 30Type ? for available commands
) = 30
socket(PF_INET6, SOCK_STREAM, IPPROTO_IP) = 5
close(5)                                = 0
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 5
getsockopt(5, SOL_SOCKET, SO_TYPE, [1], [4]) = 0
getsockopt(5, SOL_TCP, TCP_NODELAY, [0], [4]) = 0
setsockopt(5, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
setsockopt(5, SOL_SOCKET, SO_REUSEPORT, [1], 4) = 0
bind(5, {sa_family=AF_INET, sin_port=htons(64211), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
getsockname(5, {sa_family=AF_INET, sin_port=htons(64211), sin_addr=inet_addr("0.0.0.0")}, [16]) = 0
setsockopt(5, SOL_TCP, TCP_NODELAY, [1], 4) = 0
socket(PF_INET6, SOCK_STREAM, IPPROTO_IP) = 6
getsockopt(6, SOL_SOCKET, SO_TYPE, [1], [4]) = 0
getsockopt(6, SOL_TCP, TCP_NODELAY, [0], [4]) = 0
setsockopt(6, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
setsockopt(6, SOL_SOCKET, SO_REUSEPORT, [1], 4) = 0
bind(6, {sa_family=AF_INET6, sin6_port=htons(64211), inet_pton(AF_INET6, "::", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = 0
getsockname(6, {sa_family=AF_INET6, sin6_port=htons(64211), inet_pton(AF_INET6, "::", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, [28]) = 0
setsockopt(6, SOL_TCP, TCP_NODELAY, [1], 4) = 0
listen(5, 15)                           = 0
mmap(NULL, 8392704, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f8ab39f9000
mprotect(0x7f8ab39f9000, 4096, PROT_NONE) = 0
clone(child_stack=0x7f8ab41f8ff0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f8ab41f99d0, tls=0x7f8ab41f9700, child_tidptr=0x7f8ab41f99d0) = 28987
sched_getparam(28987, [0])              = 0
sched_getscheduler(28987)               = 0 (SCHED_OTHER)
listen(6, 15)                           = 0
mmap(NULL, 8392704, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f8ab31f8000
mprotect(0x7f8ab31f8000, 4096, PROT_NONE) = 0
clone(child_stack=0x7f8ab39f7ff0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f8ab39f89d0, tls=0x7f8ab39f8700, child_tidptr=0x7f8ab39f89d0) = 28988
sched_getparam(28988, [0])              = 0
sched_getscheduler(28988)               = 0 (SCHED_OTHER)
brk(0x1f55000)                          = 0x1f55000
brk(0x1f76000)                          = 0x1f76000
brk(0x1f97000)                          = 0x1f97000
brk(0x1fba000)                          = 0x1fba000
brk(0x1fdb000)                          = 0x1fdb000
mmap(NULL, 200704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8ab82b8000
mmap(NULL, 200704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8ab8287000
write(1, ">", 1>)                        = 1
read(0, 0xe0bf90, 128)                  = -1 EAGAIN (Resource temporarily unavailable)
read(0, 0xe0bf90, 128)                  = -1 EAGAIN (Resource temporarily unavailable)
shutdown(5, SHUT_WR)                    = 0
close(5)                                = 0
select(4, [3], NULL, NULL, {1, 0})      = 1 (in [3], left {0, 999997})
ioctl(3, FIONREAD, [1])                 = 0
read(3, "\0", 1)                        = 1
select(4, [3], NULL, NULL, {1, 0})      = 1 (in [3], left {0, 817727})
ioctl(3, FIONREAD, [1])                 = 0
read(3, "\0", 1)                        = 1
select(4, [3], NULL, NULL, {1, 0})      = 1 (in [3], left {0, 999997})
ioctl(3, FIONREAD, [1])                 = 0
read(3, "\0", 1)                        = 1
shutdown(6, SHUT_WR)                    = 0
close(6)                                = 0
select(4, [3], NULL, NULL, {1, 0})      = 1 (in [3], left {0, 974854})
ioctl(3, FIONREAD, [1])                 = 0
read(3, "\0", 1)                        = 1
shutdown(7, SHUT_WR)                    = 0
close(7)                                = 0
shutdown(8, SHUT_WR)                    = 0
close(8)                                = 0
select(0, NULL, NULL, NULL, {0, 500000}) = 0 (Timeout)
write(1, "EInOutError: I/O error 11\n", 26EInOutError: I/O error 11
) = 26

Thanks in advance for help!

MichaSchumann
  • 1,361
  • 1
  • 17
  • 36
  • 1
    Have you tried a console app? You mentioned a one-form app, which isn't a 10.3 feature on Linux. There aren't many Linux people with Delphi, but I have written a few articles on the topic. I haven't tried to debug with 10.3 on Linux yet, but 10.2 worked fine. I will try first thing in the morning to make sure its not a 10.3 issue. I/O error 11 is the same as EAGAIN. – Allen Drennan Feb 06 '19 at 00:57
  • Yes, also an empty console app crashes immediately. For forms I use FMXLinux which works great. And I am sure, that I already debugged under Linux with 10.3. – MichaSchumann Feb 06 '19 at 07:26
  • I tried to debug a quick console app on 10.3 Linux and everything worked as expected. Maybe something is interfering with communications like anti-virus software on the Windows side? – Allen Drennan Feb 06 '19 at 12:56
  • Thanks Allan, are you using vmWare-Player and if - which version? – MichaSchumann Feb 06 '19 at 13:48
  • I switched off the windows firewall and only run Windows security software of Windows 10. Same result. – MichaSchumann Feb 06 '19 at 14:00
  • I only tried it with a real Ubuntu 16.04 LTS version computer, not using VMWare. – Allen Drennan Feb 06 '19 at 14:08
  • I now suspect vmware player 15 to be the root cause. I will try with virtual box. – MichaSchumann Feb 06 '19 at 14:12

2 Answers2

1

Please check https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1813873

Ubuntu kernel 4.15.0-44 introduced this trouble, and Ubuntu will fix this trouble on next kernel update, Mar 4th.

0

Completely revised answer.

It doesn't seem to be related to vmWare Player 15 but somehow to Ubuntu, 16 as well as 18. In all non Linux OS debugging works and also in Rhedhat 7 and the Debian Stretch.

In Debian 9 I had to use the sdk generated with the Ubuntu machine as some files were missing when generated in Debian. May be easy to solve but the other SDK does its job.

MichaSchumann
  • 1,361
  • 1
  • 17
  • 36