-
Notifications
You must be signed in to change notification settings - Fork 18.6k
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
Proposal: Core dump in docker #19289
Comments
@cpuguy83 @moxiegirl @thaJeztah @vdemeester Hi, what do you think about this? Could you please give some comments? |
1) put core_pattern on ve_struct and add virtualized proc_handler using macro sysctl_virtual() 2) use in-container khelper kthread for collecting cores We need support of pipe'ing coredump in CT. If process crashes in CT and kernel.core_pattern begins with "|" we get error: CT: CT-101-bash-4.2# sysctl kernel.core_pattern kernel.core_pattern = |/root/core_test %p UID=%u GID=%g sig=%s CT-101-bash-4.2# sleep 100 & [1] 445 CT-101-bash-4.2# kill -11 445 CT-101-bash-4.2# [1]+ Segmentation fault sleep 100 CT-101-bash-4.2# ll /root total 8 rwxr-xr-x 1 root root 7424 Jan 27 17:28 core_test Host: [root@s143 ~]# less /var/log/messages Jan 28 10:40:42 s143 kernel: [87698.969582] Core dump to |/root/core_test 445 UID=0 GID=0 sig=11 pipe failed Also docker is going to use pipe'ing in coredumps functionality: moby/moby#19289 https://jira.sw.ru/browse/PSBM-43596 v2: split sysctl_virtual in separate patch Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
1) put core_pattern on ve_struct and add virtualized proc_handler using macro sysctl_virtual() 2) use in-container khelper kthread for collecting cores We need support of pipe'ing coredump in CT. If process crashes in CT and kernel.core_pattern begins with "|" we get error: CT: CT-101-bash-4.2# sysctl kernel.core_pattern kernel.core_pattern = |/root/core_test %p UID=%u GID=%g sig=%s CT-101-bash-4.2# sleep 100 & [1] 445 CT-101-bash-4.2# kill -11 445 CT-101-bash-4.2# [1]+ Segmentation fault sleep 100 CT-101-bash-4.2# ll /root total 8 rwxr-xr-x 1 root root 7424 Jan 27 17:28 core_test Host: [root@s143 ~]# less /var/log/messages Jan 28 10:40:42 s143 kernel: [87698.969582] Core dump to |/root/core_test 445 UID=0 GID=0 sig=11 pipe failed Also docker is going to use pipe'ing in coredumps functionality: moby/moby#19289 https://jira.sw.ru/browse/PSBM-43596 v2: split sysctl_virtual in separate patch Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
1) put core_pattern on ve_struct and add virtualized proc_handler using macro sysctl_virtual() 2) use in-container khelper kthread for collecting cores We need support of pipe'ing coredump in CT. If process crashes in CT and kernel.core_pattern begins with "|" we get error: CT: CT-101-bash-4.2# sysctl kernel.core_pattern kernel.core_pattern = |/root/core_test %p UID=%u GID=%g sig=%s CT-101-bash-4.2# sleep 100 & [1] 445 CT-101-bash-4.2# kill -11 445 CT-101-bash-4.2# [1]+ Segmentation fault sleep 100 CT-101-bash-4.2# ll /root total 8 rwxr-xr-x 1 root root 7424 Jan 27 17:28 core_test Host: [root@s143 ~]# less /var/log/messages Jan 28 10:40:42 s143 kernel: [87698.969582] Core dump to |/root/core_test 445 UID=0 GID=0 sig=11 pipe failed Also docker is going to use pipe'ing in coredumps functionality: moby/moby#19289 https://jira.sw.ru/browse/PSBM-43596 v2: split sysctl_virtual in separate patch Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
1) put core_pattern on ve_struct and add virtualized proc_handler using macro sysctl_virtual() 2) use in-container khelper kthread for collecting cores We need support of pipe'ing coredump in CT. If process crashes in CT and kernel.core_pattern begins with "|" we get error: CT: CT-101-bash-4.2# sysctl kernel.core_pattern kernel.core_pattern = |/root/core_test %p UID=%u GID=%g sig=%s CT-101-bash-4.2# sleep 100 & [1] 445 CT-101-bash-4.2# kill -11 445 CT-101-bash-4.2# [1]+ Segmentation fault sleep 100 CT-101-bash-4.2# ll /root total 8 rwxr-xr-x 1 root root 7424 Jan 27 17:28 core_test Host: [root@s143 ~]# less /var/log/messages Jan 28 10:40:42 s143 kernel: [87698.969582] Core dump to |/root/core_test 445 UID=0 GID=0 sig=11 pipe failed Also docker is going to use pipe'ing in coredumps functionality: moby/moby#19289 https://jira.sw.ru/browse/PSBM-43596 v2: split sysctl_virtual in separate patch Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
1) put core_pattern on ve_struct and add virtualized proc_handler using macro sysctl_virtual() 2) use in-container khelper kthread for collecting cores We need support of pipe'ing coredump in CT. If process crashes in CT and kernel.core_pattern begins with "|" we get error: CT: CT-101-bash-4.2# sysctl kernel.core_pattern kernel.core_pattern = |/root/core_test %p UID=%u GID=%g sig=%s CT-101-bash-4.2# sleep 100 & [1] 445 CT-101-bash-4.2# kill -11 445 CT-101-bash-4.2# [1]+ Segmentation fault sleep 100 CT-101-bash-4.2# ll /root total 8 rwxr-xr-x 1 root root 7424 Jan 27 17:28 core_test Host: [root@s143 ~]# less /var/log/messages Jan 28 10:40:42 s143 kernel: [87698.969582] Core dump to |/root/core_test 445 UID=0 GID=0 sig=11 pipe failed Also docker is going to use pipe'ing in coredumps functionality: moby/moby#19289 https://jira.sw.ru/browse/PSBM-43596 v2: split sysctl_virtual in separate patch Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
1) put core_pattern on ve_struct and add virtualized proc_handler using macro sysctl_virtual() 2) use in-container khelper kthread for collecting cores We need support of pipe'ing coredump in CT. If process crashes in CT and kernel.core_pattern begins with "|" we get error: CT: CT-101-bash-4.2# sysctl kernel.core_pattern kernel.core_pattern = |/root/core_test %p UID=%u GID=%g sig=%s CT-101-bash-4.2# sleep 100 & [1] 445 CT-101-bash-4.2# kill -11 445 CT-101-bash-4.2# [1]+ Segmentation fault sleep 100 CT-101-bash-4.2# ll /root total 8 rwxr-xr-x 1 root root 7424 Jan 27 17:28 core_test Host: [root@s143 ~]# less /var/log/messages Jan 28 10:40:42 s143 kernel: [87698.969582] Core dump to |/root/core_test 445 UID=0 GID=0 sig=11 pipe failed Also docker is going to use pipe'ing in coredumps functionality: moby/moby#19289 https://jira.sw.ru/browse/PSBM-43596 v2: split sysctl_virtual in separate patch Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
1) put core_pattern on ve_struct and add virtualized proc_handler using macro sysctl_virtual() 2) use in-container khelper kthread for collecting cores We need support of pipe'ing coredump in CT. If process crashes in CT and kernel.core_pattern begins with "|" we get error: CT: CT-101-bash-4.2# sysctl kernel.core_pattern kernel.core_pattern = |/root/core_test %p UID=%u GID=%g sig=%s CT-101-bash-4.2# sleep 100 & [1] 445 CT-101-bash-4.2# kill -11 445 CT-101-bash-4.2# [1]+ Segmentation fault sleep 100 CT-101-bash-4.2# ll /root total 8 rwxr-xr-x 1 root root 7424 Jan 27 17:28 core_test Host: [root@s143 ~]# less /var/log/messages Jan 28 10:40:42 s143 kernel: [87698.969582] Core dump to |/root/core_test 445 UID=0 GID=0 sig=11 pipe failed Also docker is going to use pipe'ing in coredumps functionality: moby/moby#19289 https://jira.sw.ru/browse/PSBM-43596 v2: split sysctl_virtual in separate patch Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
This looks like nice thing to have. |
1) put core_pattern on ve_struct and add virtualized proc_handler using macro sysctl_virtual() 2) use in-container khelper kthread for collecting cores We need support of pipe'ing coredump in CT. If process crashes in CT and kernel.core_pattern begins with "|" we get error: CT: CT-101-bash-4.2# sysctl kernel.core_pattern kernel.core_pattern = |/root/core_test %p UID=%u GID=%g sig=%s CT-101-bash-4.2# sleep 100 & [1] 445 CT-101-bash-4.2# kill -11 445 CT-101-bash-4.2# [1]+ Segmentation fault sleep 100 CT-101-bash-4.2# ll /root total 8 rwxr-xr-x 1 root root 7424 Jan 27 17:28 core_test Host: [root@s143 ~]# less /var/log/messages Jan 28 10:40:42 s143 kernel: [87698.969582] Core dump to |/root/core_test 445 UID=0 GID=0 sig=11 pipe failed Also docker is going to use pipe'ing in coredumps functionality: moby/moby#19289 https://jira.sw.ru/browse/PSBM-43596 v2: split sysctl_virtual in separate patch Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Supporting, since it appears impossible to use a host data volume as a custom Docker Engine 1.12.2:
|
1) put core_pattern on ve_struct and add virtualized proc_handler using macro sysctl_virtual() 2) use in-container khelper kthread for collecting cores We need support of pipe'ing coredump in CT. If process crashes in CT and kernel.core_pattern begins with "|" we get error: CT: CT-101-bash-4.2# sysctl kernel.core_pattern kernel.core_pattern = |/root/core_test %p UID=%u GID=%g sig=%s CT-101-bash-4.2# sleep 100 & [1] 445 CT-101-bash-4.2# kill -11 445 CT-101-bash-4.2# [1]+ Segmentation fault sleep 100 CT-101-bash-4.2# ll /root total 8 rwxr-xr-x 1 root root 7424 Jan 27 17:28 core_test Host: [root@s143 ~]# less /var/log/messages Jan 28 10:40:42 s143 kernel: [87698.969582] Core dump to |/root/core_test 445 UID=0 GID=0 sig=11 pipe failed Also docker is going to use pipe'ing in coredumps functionality: moby/moby#19289 https://jira.sw.ru/browse/PSBM-43596 v2: split sysctl_virtual in separate patch Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
1) put core_pattern on ve_struct and add virtualized proc_handler using macro sysctl_virtual() 2) use in-container khelper kthread for collecting cores We need support of pipe'ing coredump in CT. If process crashes in CT and kernel.core_pattern begins with "|" we get error: CT: CT-101-bash-4.2# sysctl kernel.core_pattern kernel.core_pattern = |/root/core_test %p UID=%u GID=%g sig=%s CT-101-bash-4.2# sleep 100 & [1] 445 CT-101-bash-4.2# kill -11 445 CT-101-bash-4.2# [1]+ Segmentation fault sleep 100 CT-101-bash-4.2# ll /root total 8 rwxr-xr-x 1 root root 7424 Jan 27 17:28 core_test Host: [root@s143 ~]# less /var/log/messages Jan 28 10:40:42 s143 kernel: [87698.969582] Core dump to |/root/core_test 445 UID=0 GID=0 sig=11 pipe failed Also docker is going to use pipe'ing in coredumps functionality: moby/moby#19289 https://jira.sw.ru/browse/PSBM-43596 v2: split sysctl_virtual in separate patch Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
1) put core_pattern on ve_struct and add virtualized proc_handler using macro sysctl_virtual() 2) use in-container khelper kthread for collecting cores We need support of pipe'ing coredump in CT. If process crashes in CT and kernel.core_pattern begins with "|" we get error: CT: CT-101-bash-4.2# sysctl kernel.core_pattern kernel.core_pattern = |/root/core_test %p UID=%u GID=%g sig=%s CT-101-bash-4.2# sleep 100 & [1] 445 CT-101-bash-4.2# kill -11 445 CT-101-bash-4.2# [1]+ Segmentation fault sleep 100 CT-101-bash-4.2# ll /root total 8 rwxr-xr-x 1 root root 7424 Jan 27 17:28 core_test Host: [root@s143 ~]# less /var/log/messages Jan 28 10:40:42 s143 kernel: [87698.969582] Core dump to |/root/core_test 445 UID=0 GID=0 sig=11 pipe failed Also docker is going to use pipe'ing in coredumps functionality: moby/moby#19289 https://jira.sw.ru/browse/PSBM-43596 v2: split sysctl_virtual in separate patch Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
1) put core_pattern on ve_struct and add virtualized proc_handler using macro sysctl_virtual() 2) use in-container khelper kthread for collecting cores We need support of pipe'ing coredump in CT. If process crashes in CT and kernel.core_pattern begins with "|" we get error: CT: CT-101-bash-4.2# sysctl kernel.core_pattern kernel.core_pattern = |/root/core_test %p UID=%u GID=%g sig=%s CT-101-bash-4.2# sleep 100 & [1] 445 CT-101-bash-4.2# kill -11 445 CT-101-bash-4.2# [1]+ Segmentation fault sleep 100 CT-101-bash-4.2# ll /root total 8 rwxr-xr-x 1 root root 7424 Jan 27 17:28 core_test Host: [root@s143 ~]# less /var/log/messages Jan 28 10:40:42 s143 kernel: [87698.969582] Core dump to |/root/core_test 445 UID=0 GID=0 sig=11 pipe failed Also docker is going to use pipe'ing in coredumps functionality: moby/moby#19289 https://jira.sw.ru/browse/PSBM-43596 v2: split sysctl_virtual in separate patch Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
1) put core_pattern on ve_struct and add virtualized proc_handler using macro sysctl_virtual() 2) use in-container khelper kthread for collecting cores We need support of pipe'ing coredump in CT. If process crashes in CT and kernel.core_pattern begins with "|" we get error: CT: CT-101-bash-4.2# sysctl kernel.core_pattern kernel.core_pattern = |/root/core_test %p UID=%u GID=%g sig=%s CT-101-bash-4.2# sleep 100 & [1] 445 CT-101-bash-4.2# kill -11 445 CT-101-bash-4.2# [1]+ Segmentation fault sleep 100 CT-101-bash-4.2# ll /root total 8 rwxr-xr-x 1 root root 7424 Jan 27 17:28 core_test Host: [root@s143 ~]# less /var/log/messages Jan 28 10:40:42 s143 kernel: [87698.969582] Core dump to |/root/core_test 445 UID=0 GID=0 sig=11 pipe failed Also docker is going to use pipe'ing in coredumps functionality: moby/moby#19289 https://jira.sw.ru/browse/PSBM-43596 v2: split sysctl_virtual in separate patch Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
1) put core_pattern on ve_struct and add virtualized proc_handler using macro sysctl_virtual() 2) use in-container khelper kthread for collecting cores We need support of pipe'ing coredump in CT. If process crashes in CT and kernel.core_pattern begins with "|" we get error: CT: CT-101-bash-4.2# sysctl kernel.core_pattern kernel.core_pattern = |/root/core_test %p UID=%u GID=%g sig=%s CT-101-bash-4.2# sleep 100 & [1] 445 CT-101-bash-4.2# kill -11 445 CT-101-bash-4.2# [1]+ Segmentation fault sleep 100 CT-101-bash-4.2# ll /root total 8 rwxr-xr-x 1 root root 7424 Jan 27 17:28 core_test Host: [root@s143 ~]# less /var/log/messages Jan 28 10:40:42 s143 kernel: [87698.969582] Core dump to |/root/core_test 445 UID=0 GID=0 sig=11 pipe failed Also docker is going to use pipe'ing in coredumps functionality: moby/moby#19289 https://jira.sw.ru/browse/PSBM-43596 v2: split sysctl_virtual in separate patch Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
1) put core_pattern on ve_struct and add virtualized proc_handler using macro sysctl_virtual() 2) use in-container khelper kthread for collecting cores We need support of pipe'ing coredump in CT. If process crashes in CT and kernel.core_pattern begins with "|" we get error: CT: CT-101-bash-4.2# sysctl kernel.core_pattern kernel.core_pattern = |/root/core_test %p UID=%u GID=%g sig=%s CT-101-bash-4.2# sleep 100 & [1] 445 CT-101-bash-4.2# kill -11 445 CT-101-bash-4.2# [1]+ Segmentation fault sleep 100 CT-101-bash-4.2# ll /root total 8 rwxr-xr-x 1 root root 7424 Jan 27 17:28 core_test Host: [root@s143 ~]# less /var/log/messages Jan 28 10:40:42 s143 kernel: [87698.969582] Core dump to |/root/core_test 445 UID=0 GID=0 sig=11 pipe failed Also docker is going to use pipe'ing in coredumps functionality: moby/moby#19289 https://jira.sw.ru/browse/PSBM-43596 v2: split sysctl_virtual in separate patch Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
1) put core_pattern on ve_struct and add virtualized proc_handler using macro sysctl_virtual() 2) use in-container khelper kthread for collecting cores We need support of pipe'ing coredump in CT. If process crashes in CT and kernel.core_pattern begins with "|" we get error: CT: CT-101-bash-4.2# sysctl kernel.core_pattern kernel.core_pattern = |/root/core_test %p UID=%u GID=%g sig=%s CT-101-bash-4.2# sleep 100 & [1] 445 CT-101-bash-4.2# kill -11 445 CT-101-bash-4.2# [1]+ Segmentation fault sleep 100 CT-101-bash-4.2# ll /root total 8 rwxr-xr-x 1 root root 7424 Jan 27 17:28 core_test Host: [root@s143 ~]# less /var/log/messages Jan 28 10:40:42 s143 kernel: [87698.969582] Core dump to |/root/core_test 445 UID=0 GID=0 sig=11 pipe failed Also docker is going to use pipe'ing in coredumps functionality: moby/moby#19289 https://jira.sw.ru/browse/PSBM-43596 v2: split sysctl_virtual in separate patch Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
What is the best way to get the core dump files onto my local machine from remote container so I can examine the files? The files are huge. |
1) put core_pattern on ve_struct and add virtualized proc_handler using macro sysctl_virtual() 2) use in-container khelper kthread for collecting cores We need support of pipe'ing coredump in CT. If process crashes in CT and kernel.core_pattern begins with "|" we get error: CT: CT-101-bash-4.2# sysctl kernel.core_pattern kernel.core_pattern = |/root/core_test %p UID=%u GID=%g sig=%s CT-101-bash-4.2# sleep 100 & [1] 445 CT-101-bash-4.2# kill -11 445 CT-101-bash-4.2# [1]+ Segmentation fault sleep 100 CT-101-bash-4.2# ll /root total 8 rwxr-xr-x 1 root root 7424 Jan 27 17:28 core_test Host: [root@s143 ~]# less /var/log/messages Jan 28 10:40:42 s143 kernel: [87698.969582] Core dump to |/root/core_test 445 UID=0 GID=0 sig=11 pipe failed Also docker is going to use pipe'ing in coredumps functionality: moby/moby#19289 https://jira.sw.ru/browse/PSBM-43596 v2: split sysctl_virtual in separate patch Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
1) put core_pattern on ve_struct and add virtualized proc_handler using macro sysctl_virtual() 2) use in-container khelper kthread for collecting cores We need support of pipe'ing coredump in CT. If process crashes in CT and kernel.core_pattern begins with "|" we get error: CT: CT-101-bash-4.2# sysctl kernel.core_pattern kernel.core_pattern = |/root/core_test %p UID=%u GID=%g sig=%s CT-101-bash-4.2# sleep 100 & [1] 445 CT-101-bash-4.2# kill -11 445 CT-101-bash-4.2# [1]+ Segmentation fault sleep 100 CT-101-bash-4.2# ll /root total 8 rwxr-xr-x 1 root root 7424 Jan 27 17:28 core_test Host: [root@s143 ~]# less /var/log/messages Jan 28 10:40:42 s143 kernel: [87698.969582] Core dump to |/root/core_test 445 UID=0 GID=0 sig=11 pipe failed Also docker is going to use pipe'ing in coredumps functionality: moby/moby#19289 https://jira.sw.ru/browse/PSBM-43596 v2: split sysctl_virtual in separate patch Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
1) put core_pattern on ve_struct and add virtualized proc_handler using macro sysctl_virtual() 2) use in-container khelper kthread for collecting cores We need support of pipe'ing coredump in CT. If process crashes in CT and kernel.core_pattern begins with "|" we get error: CT: CT-101-bash-4.2# sysctl kernel.core_pattern kernel.core_pattern = |/root/core_test %p UID=%u GID=%g sig=%s CT-101-bash-4.2# sleep 100 & [1] 445 CT-101-bash-4.2# kill -11 445 CT-101-bash-4.2# [1]+ Segmentation fault sleep 100 CT-101-bash-4.2# ll /root total 8 rwxr-xr-x 1 root root 7424 Jan 27 17:28 core_test Host: [root@s143 ~]# less /var/log/messages Jan 28 10:40:42 s143 kernel: [87698.969582] Core dump to |/root/core_test 445 UID=0 GID=0 sig=11 pipe failed Also docker is going to use pipe'ing in coredumps functionality: moby/moby#19289 https://jira.sw.ru/browse/PSBM-43596 v2: split sysctl_virtual in separate patch Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com> Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com>
1) put core_pattern on ve_struct and add virtualized proc_handler using macro sysctl_virtual() 2) use in-container khelper kthread for collecting cores We need support of pipe'ing coredump in CT. If process crashes in CT and kernel.core_pattern begins with "|" we get error: CT: CT-101-bash-4.2# sysctl kernel.core_pattern kernel.core_pattern = |/root/core_test %p UID=%u GID=%g sig=%s CT-101-bash-4.2# sleep 100 & [1] 445 CT-101-bash-4.2# kill -11 445 CT-101-bash-4.2# [1]+ Segmentation fault sleep 100 CT-101-bash-4.2# ll /root total 8 rwxr-xr-x 1 root root 7424 Jan 27 17:28 core_test Host: [root@s143 ~]# less /var/log/messages Jan 28 10:40:42 s143 kernel: [87698.969582] Core dump to |/root/core_test 445 UID=0 GID=0 sig=11 pipe failed Also docker is going to use pipe'ing in coredumps functionality: moby/moby#19289 https://jira.sw.ru/browse/PSBM-43596 v2: split sysctl_virtual in separate patch Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
@playground What about installing |
1) put core_pattern on ve_struct and add virtualized proc_handler using macro sysctl_virtual() 2) use in-container khelper kthread for collecting cores We need support of pipe'ing coredump in CT. If process crashes in CT and kernel.core_pattern begins with "|" we get error: CT: CT-101-bash-4.2# sysctl kernel.core_pattern kernel.core_pattern = |/root/core_test %p UID=%u GID=%g sig=%s CT-101-bash-4.2# sleep 100 & [1] 445 CT-101-bash-4.2# kill -11 445 CT-101-bash-4.2# [1]+ Segmentation fault sleep 100 CT-101-bash-4.2# ll /root total 8 rwxr-xr-x 1 root root 7424 Jan 27 17:28 core_test Host: [root@s143 ~]# less /var/log/messages Jan 28 10:40:42 s143 kernel: [87698.969582] Core dump to |/root/core_test 445 UID=0 GID=0 sig=11 pipe failed Also docker is going to use pipe'ing in coredumps functionality: moby/moby#19289 https://jira.sw.ru/browse/PSBM-43596 v2: split sysctl_virtual in separate patch Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Hi, everyone, do we have any progress about this issue? |
1) put core_pattern on ve_struct and add virtualized proc_handler using macro sysctl_virtual() 2) use in-container khelper kthread for collecting cores We need support of pipe'ing coredump in CT. If process crashes in CT and kernel.core_pattern begins with "|" we get error: CT: CT-101-bash-4.2# sysctl kernel.core_pattern kernel.core_pattern = |/root/core_test %p UID=%u GID=%g sig=%s CT-101-bash-4.2# sleep 100 & [1] 445 CT-101-bash-4.2# kill -11 445 CT-101-bash-4.2# [1]+ Segmentation fault sleep 100 CT-101-bash-4.2# ll /root total 8 rwxr-xr-x 1 root root 7424 Jan 27 17:28 core_test Host: [root@s143 ~]# less /var/log/messages Jan 28 10:40:42 s143 kernel: [87698.969582] Core dump to |/root/core_test 445 UID=0 GID=0 sig=11 pipe failed Also docker is going to use pipe'ing in coredumps functionality: moby/moby#19289 https://jira.sw.ru/browse/PSBM-43596 v2: split sysctl_virtual in separate patch Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
1) put core_pattern on ve_struct and add virtualized proc_handler using macro sysctl_virtual() 2) use in-container khelper kthread for collecting cores We need support of pipe'ing coredump in CT. If process crashes in CT and kernel.core_pattern begins with "|" we get error: CT: CT-101-bash-4.2# sysctl kernel.core_pattern kernel.core_pattern = |/root/core_test %p UID=%u GID=%g sig=%s CT-101-bash-4.2# sleep 100 & [1] 445 CT-101-bash-4.2# kill -11 445 CT-101-bash-4.2# [1]+ Segmentation fault sleep 100 CT-101-bash-4.2# ll /root total 8 rwxr-xr-x 1 root root 7424 Jan 27 17:28 core_test Host: [root@s143 ~]# less /var/log/messages Jan 28 10:40:42 s143 kernel: [87698.969582] Core dump to |/root/core_test 445 UID=0 GID=0 sig=11 pipe failed Also docker is going to use pipe'ing in coredumps functionality: moby/moby#19289 https://jira.sw.ru/browse/PSBM-43596 v2: split sysctl_virtual in separate patch Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com> Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com>
1) put core_pattern on ve_struct and add virtualized proc_handler using macro sysctl_virtual() 2) use in-container khelper kthread for collecting cores We need support of pipe'ing coredump in CT. If process crashes in CT and kernel.core_pattern begins with "|" we get error: CT: CT-101-bash-4.2# sysctl kernel.core_pattern kernel.core_pattern = |/root/core_test %p UID=%u GID=%g sig=%s CT-101-bash-4.2# sleep 100 & [1] 445 CT-101-bash-4.2# kill -11 445 CT-101-bash-4.2# [1]+ Segmentation fault sleep 100 CT-101-bash-4.2# ll /root total 8 rwxr-xr-x 1 root root 7424 Jan 27 17:28 core_test Host: [root@s143 ~]# less /var/log/messages Jan 28 10:40:42 s143 kernel: [87698.969582] Core dump to |/root/core_test 445 UID=0 GID=0 sig=11 pipe failed Also docker is going to use pipe'ing in coredumps functionality: moby/moby#19289 https://jira.sw.ru/browse/PSBM-43596 v2: split sysctl_virtual in separate patch Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
1) put core_pattern on ve_struct and add virtualized proc_handler using macro sysctl_virtual() 2) use in-container khelper kthread for collecting cores We need support of pipe'ing coredump in CT. If process crashes in CT and kernel.core_pattern begins with "|" we get error: CT: CT-101-bash-4.2# sysctl kernel.core_pattern kernel.core_pattern = |/root/core_test %p UID=%u GID=%g sig=%s CT-101-bash-4.2# sleep 100 & [1] 445 CT-101-bash-4.2# kill -11 445 CT-101-bash-4.2# [1]+ Segmentation fault sleep 100 CT-101-bash-4.2# ll /root total 8 rwxr-xr-x 1 root root 7424 Jan 27 17:28 core_test Host: [root@s143 ~]# less /var/log/messages Jan 28 10:40:42 s143 kernel: [87698.969582] Core dump to |/root/core_test 445 UID=0 GID=0 sig=11 pipe failed Also docker is going to use pipe'ing in coredumps functionality: moby/moby#19289 https://jira.sw.ru/browse/PSBM-43596 v2: split sysctl_virtual in separate patch Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
2020 - it is still a struggle to get a core dump without having to start container in privilege mode and impacting host config and other PODs... coronavirus will get us all before we can analyse those juicy core dumps waiting for us |
1) put core_pattern on ve_struct and add virtualized proc_handler using macro sysctl_virtual() 2) use in-container khelper kthread for collecting cores We need support of pipe'ing coredump in CT. If process crashes in CT and kernel.core_pattern begins with "|" we get error: CT: CT-101-bash-4.2# sysctl kernel.core_pattern kernel.core_pattern = |/root/core_test %p UID=%u GID=%g sig=%s CT-101-bash-4.2# sleep 100 & [1] 445 CT-101-bash-4.2# kill -11 445 CT-101-bash-4.2# [1]+ Segmentation fault sleep 100 CT-101-bash-4.2# ll /root total 8 rwxr-xr-x 1 root root 7424 Jan 27 17:28 core_test Host: [root@s143 ~]# less /var/log/messages Jan 28 10:40:42 s143 kernel: [87698.969582] Core dump to |/root/core_test 445 UID=0 GID=0 sig=11 pipe failed Also docker is going to use pipe'ing in coredumps functionality: moby/moby#19289 https://jira.sw.ru/browse/PSBM-43596 v2: split sysctl_virtual in separate patch Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
1) put core_pattern on ve_struct and add virtualized proc_handler using macro sysctl_virtual() 2) use in-container khelper kthread for collecting cores We need support of pipe'ing coredump in CT. If process crashes in CT and kernel.core_pattern begins with "|" we get error: CT: CT-101-bash-4.2# sysctl kernel.core_pattern kernel.core_pattern = |/root/core_test %p UID=%u GID=%g sig=%s CT-101-bash-4.2# sleep 100 & [1] 445 CT-101-bash-4.2# kill -11 445 CT-101-bash-4.2# [1]+ Segmentation fault sleep 100 CT-101-bash-4.2# ll /root total 8 rwxr-xr-x 1 root root 7424 Jan 27 17:28 core_test Host: [root@s143 ~]# less /var/log/messages Jan 28 10:40:42 s143 kernel: [87698.969582] Core dump to |/root/core_test 445 UID=0 GID=0 sig=11 pipe failed Also docker is going to use pipe'ing in coredumps functionality: moby/moby#19289 https://jira.sw.ru/browse/PSBM-43596 v2: split sysctl_virtual in separate patch Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com> Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com>
1) put core_pattern on ve_struct and add virtualized proc_handler using macro sysctl_virtual() 2) use in-container khelper kthread for collecting cores We need support of pipe'ing coredump in CT. If process crashes in CT and kernel.core_pattern begins with "|" we get error: CT: CT-101-bash-4.2# sysctl kernel.core_pattern kernel.core_pattern = |/root/core_test %p UID=%u GID=%g sig=%s CT-101-bash-4.2# sleep 100 & [1] 445 CT-101-bash-4.2# kill -11 445 CT-101-bash-4.2# [1]+ Segmentation fault sleep 100 CT-101-bash-4.2# ll /root total 8 rwxr-xr-x 1 root root 7424 Jan 27 17:28 core_test Host: [root@s143 ~]# less /var/log/messages Jan 28 10:40:42 s143 kernel: [87698.969582] Core dump to |/root/core_test 445 UID=0 GID=0 sig=11 pipe failed Also docker is going to use pipe'ing in coredumps functionality: moby/moby#19289 https://jira.sw.ru/browse/PSBM-43596 v2: split sysctl_virtual in separate patch Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com> Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com>
1) put core_pattern on ve_struct and add virtualized proc_handler using macro sysctl_virtual() 2) use in-container khelper kthread for collecting cores We need support of pipe'ing coredump in CT. If process crashes in CT and kernel.core_pattern begins with "|" we get error: CT: CT-101-bash-4.2# sysctl kernel.core_pattern kernel.core_pattern = |/root/core_test %p UID=%u GID=%g sig=%s CT-101-bash-4.2# sleep 100 & [1] 445 CT-101-bash-4.2# kill -11 445 CT-101-bash-4.2# [1]+ Segmentation fault sleep 100 CT-101-bash-4.2# ll /root total 8 rwxr-xr-x 1 root root 7424 Jan 27 17:28 core_test Host: [root@s143 ~]# less /var/log/messages Jan 28 10:40:42 s143 kernel: [87698.969582] Core dump to |/root/core_test 445 UID=0 GID=0 sig=11 pipe failed Also docker is going to use pipe'ing in coredumps functionality: moby/moby#19289 https://jira.sw.ru/browse/PSBM-43596 v2: split sysctl_virtual in separate patch Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com> Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com>
1) put core_pattern on ve_struct and add virtualized proc_handler using macro sysctl_virtual() 2) use in-container khelper kthread for collecting cores We need support of pipe'ing coredump in CT. If process crashes in CT and kernel.core_pattern begins with "|" we get error: CT: CT-101-bash-4.2# sysctl kernel.core_pattern kernel.core_pattern = |/root/core_test %p UID=%u GID=%g sig=%s CT-101-bash-4.2# sleep 100 & [1] 445 CT-101-bash-4.2# kill -11 445 CT-101-bash-4.2# [1]+ Segmentation fault sleep 100 CT-101-bash-4.2# ll /root total 8 rwxr-xr-x 1 root root 7424 Jan 27 17:28 core_test Host: [root@s143 ~]# less /var/log/messages Jan 28 10:40:42 s143 kernel: [87698.969582] Core dump to |/root/core_test 445 UID=0 GID=0 sig=11 pipe failed Also docker is going to use pipe'ing in coredumps functionality: moby/moby#19289 https://jira.sw.ru/browse/PSBM-43596 v2: split sysctl_virtual in separate patch Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com> Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com> +++ ve, coredump: Fix usercopy warning. Usercopy WARNs about copying ve.core_pattern to user space: vzctl exec e2783e5e-840e-4c9a-9ef2-7ead73afb81c cat /proc/sys/kernel/core_pattern Call Trace: __check_object_size+0x134/0x160 proc_dostring+0x164/0x200 proc_dostring_coredump_virtual+0xb2/0xd0 proc_dostring+0x200/0x200 proc_sys_call_handler+0xa7/0xf0 vfs_read+0x9d/0x150 ksys_read+0x4f/0xb0 do_syscall_64+0x5b/0x1c0 entry_SYSCALL_64_after_hwframe+0x65/0xca Whitelist core_pattern in ve_struct kmem_cache since copying core_pattern is allowed by design. Fixes: e931118 ("ve: Add ve cgroup and ve_hook subsys") https://jira.sw.ru/browse/PSBM-106216 Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com> vz9 change: merge with usercopy warning fixup for ve->core_pattern (cherry picked from vz8 commit f8c44aa) Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Too much effort. And therefore not implemented during 5yrs. For me it would be just enough
|
1) put core_pattern on ve_struct and add virtualized proc_handler using macro sysctl_virtual() 2) use in-container khelper kthread for collecting cores We need support of pipe'ing coredump in CT. If process crashes in CT and kernel.core_pattern begins with "|" we get error: CT: CT-101-bash-4.2# sysctl kernel.core_pattern kernel.core_pattern = |/root/core_test %p UID=%u GID=%g sig=%s CT-101-bash-4.2# sleep 100 & [1] 445 CT-101-bash-4.2# kill -11 445 CT-101-bash-4.2# [1]+ Segmentation fault sleep 100 CT-101-bash-4.2# ll /root total 8 rwxr-xr-x 1 root root 7424 Jan 27 17:28 core_test Host: [root@s143 ~]# less /var/log/messages Jan 28 10:40:42 s143 kernel: [87698.969582] Core dump to |/root/core_test 445 UID=0 GID=0 sig=11 pipe failed Also docker is going to use pipe'ing in coredumps functionality: moby/moby#19289 https://jira.sw.ru/browse/PSBM-43596 v2: split sysctl_virtual in separate patch Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com> Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com> +++ ve, coredump: Fix usercopy warning. Usercopy WARNs about copying ve.core_pattern to user space: vzctl exec e2783e5e-840e-4c9a-9ef2-7ead73afb81c cat /proc/sys/kernel/core_pattern Call Trace: __check_object_size+0x134/0x160 proc_dostring+0x164/0x200 proc_dostring_coredump_virtual+0xb2/0xd0 proc_dostring+0x200/0x200 proc_sys_call_handler+0xa7/0xf0 vfs_read+0x9d/0x150 ksys_read+0x4f/0xb0 do_syscall_64+0x5b/0x1c0 entry_SYSCALL_64_after_hwframe+0x65/0xca Whitelist core_pattern in ve_struct kmem_cache since copying core_pattern is allowed by design. Fixes: e931118 ("ve: Add ve cgroup and ve_hook subsys") https://jira.sw.ru/browse/PSBM-106216 Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com> vz9 change: merge with usercopy warning fixup for ve->core_pattern (cherry picked from vz8 commit f8c44aa) Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
1) put core_pattern on ve_struct and add virtualized proc_handler using macro sysctl_virtual() 2) use in-container khelper kthread for collecting cores We need support of pipe'ing coredump in CT. If process crashes in CT and kernel.core_pattern begins with "|" we get error: CT: CT-101-bash-4.2# sysctl kernel.core_pattern kernel.core_pattern = |/root/core_test %p UID=%u GID=%g sig=%s CT-101-bash-4.2# sleep 100 & [1] 445 CT-101-bash-4.2# kill -11 445 CT-101-bash-4.2# [1]+ Segmentation fault sleep 100 CT-101-bash-4.2# ll /root total 8 rwxr-xr-x 1 root root 7424 Jan 27 17:28 core_test Host: [root@s143 ~]# less /var/log/messages Jan 28 10:40:42 s143 kernel: [87698.969582] Core dump to |/root/core_test 445 UID=0 GID=0 sig=11 pipe failed Also docker is going to use pipe'ing in coredumps functionality: moby/moby#19289 https://jira.sw.ru/browse/PSBM-43596 v2: split sysctl_virtual in separate patch Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com> Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com> +++ ve, coredump: Fix usercopy warning. Usercopy WARNs about copying ve.core_pattern to user space: vzctl exec e2783e5e-840e-4c9a-9ef2-7ead73afb81c cat /proc/sys/kernel/core_pattern Call Trace: __check_object_size+0x134/0x160 proc_dostring+0x164/0x200 proc_dostring_coredump_virtual+0xb2/0xd0 proc_dostring+0x200/0x200 proc_sys_call_handler+0xa7/0xf0 vfs_read+0x9d/0x150 ksys_read+0x4f/0xb0 do_syscall_64+0x5b/0x1c0 entry_SYSCALL_64_after_hwframe+0x65/0xca Whitelist core_pattern in ve_struct kmem_cache since copying core_pattern is allowed by design. Fixes: e931118 ("ve: Add ve cgroup and ve_hook subsys") https://jira.sw.ru/browse/PSBM-106216 Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com> vz9 change: merge with usercopy warning fixup for ve->core_pattern (cherry picked from vz8 commit f8c44aa) Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Feature: sysctl: virtualize "kernel.core_pattern"
1) put core_pattern on ve_struct and add virtualized proc_handler using macro sysctl_virtual() 2) use in-container khelper kthread for collecting cores We need support of pipe'ing coredump in CT. If process crashes in CT and kernel.core_pattern begins with "|" we get error: CT: CT-101-bash-4.2# sysctl kernel.core_pattern kernel.core_pattern = |/root/core_test %p UID=%u GID=%g sig=%s CT-101-bash-4.2# sleep 100 & [1] 445 CT-101-bash-4.2# kill -11 445 CT-101-bash-4.2# [1]+ Segmentation fault sleep 100 CT-101-bash-4.2# ll /root total 8 rwxr-xr-x 1 root root 7424 Jan 27 17:28 core_test Host: [root@s143 ~]# less /var/log/messages Jan 28 10:40:42 s143 kernel: [87698.969582] Core dump to |/root/core_test 445 UID=0 GID=0 sig=11 pipe failed Also docker is going to use pipe'ing in coredumps functionality: moby/moby#19289 https://jira.sw.ru/browse/PSBM-43596 v2: split sysctl_virtual in separate patch Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com> Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com> +++ ve, coredump: Fix usercopy warning. Usercopy WARNs about copying ve.core_pattern to user space: vzctl exec e2783e5e-840e-4c9a-9ef2-7ead73afb81c cat /proc/sys/kernel/core_pattern Call Trace: __check_object_size+0x134/0x160 proc_dostring+0x164/0x200 proc_dostring_coredump_virtual+0xb2/0xd0 proc_dostring+0x200/0x200 proc_sys_call_handler+0xa7/0xf0 vfs_read+0x9d/0x150 ksys_read+0x4f/0xb0 do_syscall_64+0x5b/0x1c0 entry_SYSCALL_64_after_hwframe+0x65/0xca Whitelist core_pattern in ve_struct kmem_cache since copying core_pattern is allowed by design. Fixes: e931118 ("ve: Add ve cgroup and ve_hook subsys") https://jira.sw.ru/browse/PSBM-106216 Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com> vz9 change: merge with usercopy warning fixup for ve->core_pattern (cherry picked from vz8 commit f8c44aa) Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Feature: sysctl: virtualize "kernel.core_pattern"
1) put core_pattern on ve_struct and add virtualized proc_handler using macro sysctl_virtual() 2) use in-container khelper kthread for collecting cores We need support of pipe'ing coredump in CT. If process crashes in CT and kernel.core_pattern begins with "|" we get error: CT: CT-101-bash-4.2# sysctl kernel.core_pattern kernel.core_pattern = |/root/core_test %p UID=%u GID=%g sig=%s CT-101-bash-4.2# sleep 100 & [1] 445 CT-101-bash-4.2# kill -11 445 CT-101-bash-4.2# [1]+ Segmentation fault sleep 100 CT-101-bash-4.2# ll /root total 8 rwxr-xr-x 1 root root 7424 Jan 27 17:28 core_test Host: [root@s143 ~]# less /var/log/messages Jan 28 10:40:42 s143 kernel: [87698.969582] Core dump to |/root/core_test 445 UID=0 GID=0 sig=11 pipe failed Also docker is going to use pipe'ing in coredumps functionality: moby/moby#19289 https://jira.sw.ru/browse/PSBM-43596 v2: split sysctl_virtual in separate patch Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com> Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com> +++ ve, coredump: Fix usercopy warning. Usercopy WARNs about copying ve.core_pattern to user space: vzctl exec e2783e5e-840e-4c9a-9ef2-7ead73afb81c cat /proc/sys/kernel/core_pattern Call Trace: __check_object_size+0x134/0x160 proc_dostring+0x164/0x200 proc_dostring_coredump_virtual+0xb2/0xd0 proc_dostring+0x200/0x200 proc_sys_call_handler+0xa7/0xf0 vfs_read+0x9d/0x150 ksys_read+0x4f/0xb0 do_syscall_64+0x5b/0x1c0 entry_SYSCALL_64_after_hwframe+0x65/0xca Whitelist core_pattern in ve_struct kmem_cache since copying core_pattern is allowed by design. Fixes: e931118 ("ve: Add ve cgroup and ve_hook subsys") https://jira.sw.ru/browse/PSBM-106216 Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com> vz9 change: merge with usercopy warning fixup for ve->core_pattern (cherry picked from vz8 commit f8c44aa) Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Feature: sysctl: virtualize "kernel.core_pattern"
1) put core_pattern on ve_struct and add virtualized proc_handler using macro sysctl_virtual() 2) use in-container khelper kthread for collecting cores We need support of pipe'ing coredump in CT. If process crashes in CT and kernel.core_pattern begins with "|" we get error: CT: CT-101-bash-4.2# sysctl kernel.core_pattern kernel.core_pattern = |/root/core_test %p UID=%u GID=%g sig=%s CT-101-bash-4.2# sleep 100 & [1] 445 CT-101-bash-4.2# kill -11 445 CT-101-bash-4.2# [1]+ Segmentation fault sleep 100 CT-101-bash-4.2# ll /root total 8 rwxr-xr-x 1 root root 7424 Jan 27 17:28 core_test Host: [root@s143 ~]# less /var/log/messages Jan 28 10:40:42 s143 kernel: [87698.969582] Core dump to |/root/core_test 445 UID=0 GID=0 sig=11 pipe failed Also docker is going to use pipe'ing in coredumps functionality: moby/moby#19289 https://jira.sw.ru/browse/PSBM-43596 v2: split sysctl_virtual in separate patch Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com> Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com> +++ ve, coredump: Fix usercopy warning. Usercopy WARNs about copying ve.core_pattern to user space: vzctl exec e2783e5e-840e-4c9a-9ef2-7ead73afb81c cat /proc/sys/kernel/core_pattern Call Trace: __check_object_size+0x134/0x160 proc_dostring+0x164/0x200 proc_dostring_coredump_virtual+0xb2/0xd0 proc_dostring+0x200/0x200 proc_sys_call_handler+0xa7/0xf0 vfs_read+0x9d/0x150 ksys_read+0x4f/0xb0 do_syscall_64+0x5b/0x1c0 entry_SYSCALL_64_after_hwframe+0x65/0xca Whitelist core_pattern in ve_struct kmem_cache since copying core_pattern is allowed by design. Fixes: e931118 ("ve: Add ve cgroup and ve_hook subsys") https://jira.sw.ru/browse/PSBM-106216 Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com> vz9 change: merge with usercopy warning fixup for ve->core_pattern (cherry picked from vz8 commit f8c44aa) Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Feature: sysctl: virtualize "kernel.core_pattern"
1) put core_pattern on ve_struct and add virtualized proc_handler using macro sysctl_virtual() 2) use in-container khelper kthread for collecting cores We need support of pipe'ing coredump in CT. If process crashes in CT and kernel.core_pattern begins with "|" we get error: CT: CT-101-bash-4.2# sysctl kernel.core_pattern kernel.core_pattern = |/root/core_test %p UID=%u GID=%g sig=%s CT-101-bash-4.2# sleep 100 & [1] 445 CT-101-bash-4.2# kill -11 445 CT-101-bash-4.2# [1]+ Segmentation fault sleep 100 CT-101-bash-4.2# ll /root total 8 rwxr-xr-x 1 root root 7424 Jan 27 17:28 core_test Host: [root@s143 ~]# less /var/log/messages Jan 28 10:40:42 s143 kernel: [87698.969582] Core dump to |/root/core_test 445 UID=0 GID=0 sig=11 pipe failed Also docker is going to use pipe'ing in coredumps functionality: moby/moby#19289 https://jira.sw.ru/browse/PSBM-43596 v2: split sysctl_virtual in separate patch Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com> Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com> +++ ve, coredump: Fix usercopy warning. Usercopy WARNs about copying ve.core_pattern to user space: vzctl exec e2783e5e-840e-4c9a-9ef2-7ead73afb81c cat /proc/sys/kernel/core_pattern Call Trace: __check_object_size+0x134/0x160 proc_dostring+0x164/0x200 proc_dostring_coredump_virtual+0xb2/0xd0 proc_dostring+0x200/0x200 proc_sys_call_handler+0xa7/0xf0 vfs_read+0x9d/0x150 ksys_read+0x4f/0xb0 do_syscall_64+0x5b/0x1c0 entry_SYSCALL_64_after_hwframe+0x65/0xca Whitelist core_pattern in ve_struct kmem_cache since copying core_pattern is allowed by design. Fixes: e931118 ("ve: Add ve cgroup and ve_hook subsys") https://jira.sw.ru/browse/PSBM-106216 Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com> vz9 change: merge with usercopy warning fixup for ve->core_pattern (cherry picked from vz8 commit f8c44aa) Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Feature: sysctl: virtualize "kernel.core_pattern"
1) put core_pattern on ve_struct and add virtualized proc_handler using macro sysctl_virtual() 2) use in-container khelper kthread for collecting cores We need support of pipe'ing coredump in CT. If process crashes in CT and kernel.core_pattern begins with "|" we get error: CT: CT-101-bash-4.2# sysctl kernel.core_pattern kernel.core_pattern = |/root/core_test %p UID=%u GID=%g sig=%s CT-101-bash-4.2# sleep 100 & [1] 445 CT-101-bash-4.2# kill -11 445 CT-101-bash-4.2# [1]+ Segmentation fault sleep 100 CT-101-bash-4.2# ll /root total 8 rwxr-xr-x 1 root root 7424 Jan 27 17:28 core_test Host: [root@s143 ~]# less /var/log/messages Jan 28 10:40:42 s143 kernel: [87698.969582] Core dump to |/root/core_test 445 UID=0 GID=0 sig=11 pipe failed Also docker is going to use pipe'ing in coredumps functionality: moby/moby#19289 https://jira.sw.ru/browse/PSBM-43596 v2: split sysctl_virtual in separate patch Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com> Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com> +++ ve, coredump: Fix usercopy warning. Usercopy WARNs about copying ve.core_pattern to user space: vzctl exec e2783e5e-840e-4c9a-9ef2-7ead73afb81c cat /proc/sys/kernel/core_pattern Call Trace: __check_object_size+0x134/0x160 proc_dostring+0x164/0x200 proc_dostring_coredump_virtual+0xb2/0xd0 proc_dostring+0x200/0x200 proc_sys_call_handler+0xa7/0xf0 vfs_read+0x9d/0x150 ksys_read+0x4f/0xb0 do_syscall_64+0x5b/0x1c0 entry_SYSCALL_64_after_hwframe+0x65/0xca Whitelist core_pattern in ve_struct kmem_cache since copying core_pattern is allowed by design. Fixes: e931118 ("ve: Add ve cgroup and ve_hook subsys") https://jira.sw.ru/browse/PSBM-106216 Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com> vz9 change: merge with usercopy warning fixup for ve->core_pattern (cherry picked from vz8 commit f8c44aa) Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Feature: sysctl: virtualize "kernel.core_pattern"
1) put core_pattern on ve_struct and add virtualized proc_handler using macro sysctl_virtual() 2) use in-container khelper kthread for collecting cores We need support of pipe'ing coredump in CT. If process crashes in CT and kernel.core_pattern begins with "|" we get error: CT: CT-101-bash-4.2# sysctl kernel.core_pattern kernel.core_pattern = |/root/core_test %p UID=%u GID=%g sig=%s CT-101-bash-4.2# sleep 100 & [1] 445 CT-101-bash-4.2# kill -11 445 CT-101-bash-4.2# [1]+ Segmentation fault sleep 100 CT-101-bash-4.2# ll /root total 8 rwxr-xr-x 1 root root 7424 Jan 27 17:28 core_test Host: [root@s143 ~]# less /var/log/messages Jan 28 10:40:42 s143 kernel: [87698.969582] Core dump to |/root/core_test 445 UID=0 GID=0 sig=11 pipe failed Also docker is going to use pipe'ing in coredumps functionality: moby/moby#19289 https://jira.sw.ru/browse/PSBM-43596 v2: split sysctl_virtual in separate patch Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com> Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com> +++ ve, coredump: Fix usercopy warning. Usercopy WARNs about copying ve.core_pattern to user space: vzctl exec e2783e5e-840e-4c9a-9ef2-7ead73afb81c cat /proc/sys/kernel/core_pattern Call Trace: __check_object_size+0x134/0x160 proc_dostring+0x164/0x200 proc_dostring_coredump_virtual+0xb2/0xd0 proc_dostring+0x200/0x200 proc_sys_call_handler+0xa7/0xf0 vfs_read+0x9d/0x150 ksys_read+0x4f/0xb0 do_syscall_64+0x5b/0x1c0 entry_SYSCALL_64_after_hwframe+0x65/0xca Whitelist core_pattern in ve_struct kmem_cache since copying core_pattern is allowed by design. Fixes: e931118 ("ve: Add ve cgroup and ve_hook subsys") https://jira.sw.ru/browse/PSBM-106216 Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com> vz9 change: merge with usercopy warning fixup for ve->core_pattern (cherry picked from vz8 commit f8c44aa) Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Feature: sysctl: virtualize "kernel.core_pattern"
1) put core_pattern on ve_struct and add virtualized proc_handler using macro sysctl_virtual() 2) use in-container khelper kthread for collecting cores We need support of pipe'ing coredump in CT. If process crashes in CT and kernel.core_pattern begins with "|" we get error: CT: CT-101-bash-4.2# sysctl kernel.core_pattern kernel.core_pattern = |/root/core_test %p UID=%u GID=%g sig=%s CT-101-bash-4.2# sleep 100 & [1] 445 CT-101-bash-4.2# kill -11 445 CT-101-bash-4.2# [1]+ Segmentation fault sleep 100 CT-101-bash-4.2# ll /root total 8 rwxr-xr-x 1 root root 7424 Jan 27 17:28 core_test Host: [root@s143 ~]# less /var/log/messages Jan 28 10:40:42 s143 kernel: [87698.969582] Core dump to |/root/core_test 445 UID=0 GID=0 sig=11 pipe failed Also docker is going to use pipe'ing in coredumps functionality: moby/moby#19289 https://jira.sw.ru/browse/PSBM-43596 v2: split sysctl_virtual in separate patch Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com> Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com> +++ ve, coredump: Fix usercopy warning. Usercopy WARNs about copying ve.core_pattern to user space: vzctl exec e2783e5e-840e-4c9a-9ef2-7ead73afb81c cat /proc/sys/kernel/core_pattern Call Trace: __check_object_size+0x134/0x160 proc_dostring+0x164/0x200 proc_dostring_coredump_virtual+0xb2/0xd0 proc_dostring+0x200/0x200 proc_sys_call_handler+0xa7/0xf0 vfs_read+0x9d/0x150 ksys_read+0x4f/0xb0 do_syscall_64+0x5b/0x1c0 entry_SYSCALL_64_after_hwframe+0x65/0xca Whitelist core_pattern in ve_struct kmem_cache since copying core_pattern is allowed by design. Fixes: e931118 ("ve: Add ve cgroup and ve_hook subsys") https://jira.sw.ru/browse/PSBM-106216 Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com> vz9 change: merge with usercopy warning fixup for ve->core_pattern (cherry picked from vz8 commit f8c44aa) Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Feature: sysctl: virtualize "kernel.core_pattern"
1) put core_pattern on ve_struct and add virtualized proc_handler using macro sysctl_virtual() 2) use in-container khelper kthread for collecting cores We need support of pipe'ing coredump in CT. If process crashes in CT and kernel.core_pattern begins with "|" we get error: CT: CT-101-bash-4.2# sysctl kernel.core_pattern kernel.core_pattern = |/root/core_test %p UID=%u GID=%g sig=%s CT-101-bash-4.2# sleep 100 & [1] 445 CT-101-bash-4.2# kill -11 445 CT-101-bash-4.2# [1]+ Segmentation fault sleep 100 CT-101-bash-4.2# ll /root total 8 rwxr-xr-x 1 root root 7424 Jan 27 17:28 core_test Host: [root@s143 ~]# less /var/log/messages Jan 28 10:40:42 s143 kernel: [87698.969582] Core dump to |/root/core_test 445 UID=0 GID=0 sig=11 pipe failed Also docker is going to use pipe'ing in coredumps functionality: moby/moby#19289 https://jira.sw.ru/browse/PSBM-43596 v2: split sysctl_virtual in separate patch Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com> Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com> +++ ve, coredump: Fix usercopy warning. Usercopy WARNs about copying ve.core_pattern to user space: vzctl exec e2783e5e-840e-4c9a-9ef2-7ead73afb81c cat /proc/sys/kernel/core_pattern Call Trace: __check_object_size+0x134/0x160 proc_dostring+0x164/0x200 proc_dostring_coredump_virtual+0xb2/0xd0 proc_dostring+0x200/0x200 proc_sys_call_handler+0xa7/0xf0 vfs_read+0x9d/0x150 ksys_read+0x4f/0xb0 do_syscall_64+0x5b/0x1c0 entry_SYSCALL_64_after_hwframe+0x65/0xca Whitelist core_pattern in ve_struct kmem_cache since copying core_pattern is allowed by design. Fixes: e931118 ("ve: Add ve cgroup and ve_hook subsys") https://jira.sw.ru/browse/PSBM-106216 Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com> vz9 change: merge with usercopy warning fixup for ve->core_pattern (cherry picked from vz8 commit f8c44aa) Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Feature: sysctl: virtualize "kernel.core_pattern"
1) put core_pattern on ve_struct and add virtualized proc_handler using macro sysctl_virtual() 2) use in-container khelper kthread for collecting cores We need support of pipe'ing coredump in CT. If process crashes in CT and kernel.core_pattern begins with "|" we get error: CT: CT-101-bash-4.2# sysctl kernel.core_pattern kernel.core_pattern = |/root/core_test %p UID=%u GID=%g sig=%s CT-101-bash-4.2# sleep 100 & [1] 445 CT-101-bash-4.2# kill -11 445 CT-101-bash-4.2# [1]+ Segmentation fault sleep 100 CT-101-bash-4.2# ll /root total 8 rwxr-xr-x 1 root root 7424 Jan 27 17:28 core_test Host: [root@s143 ~]# less /var/log/messages Jan 28 10:40:42 s143 kernel: [87698.969582] Core dump to |/root/core_test 445 UID=0 GID=0 sig=11 pipe failed Also docker is going to use pipe'ing in coredumps functionality: moby/moby#19289 https://jira.sw.ru/browse/PSBM-43596 v2: split sysctl_virtual in separate patch Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com> Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com> +++ ve, coredump: Fix usercopy warning. Usercopy WARNs about copying ve.core_pattern to user space: vzctl exec e2783e5e-840e-4c9a-9ef2-7ead73afb81c cat /proc/sys/kernel/core_pattern Call Trace: __check_object_size+0x134/0x160 proc_dostring+0x164/0x200 proc_dostring_coredump_virtual+0xb2/0xd0 proc_dostring+0x200/0x200 proc_sys_call_handler+0xa7/0xf0 vfs_read+0x9d/0x150 ksys_read+0x4f/0xb0 do_syscall_64+0x5b/0x1c0 entry_SYSCALL_64_after_hwframe+0x65/0xca Whitelist core_pattern in ve_struct kmem_cache since copying core_pattern is allowed by design. Fixes: e931118 ("ve: Add ve cgroup and ve_hook subsys") https://jira.sw.ru/browse/PSBM-106216 Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com> vz9 change: merge with usercopy warning fixup for ve->core_pattern (cherry picked from vz8 commit f8c44aa) Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Feature: sysctl: virtualize "kernel.core_pattern"
1) put core_pattern on ve_struct and add virtualized proc_handler using macro sysctl_virtual() 2) use in-container khelper kthread for collecting cores We need support of pipe'ing coredump in CT. If process crashes in CT and kernel.core_pattern begins with "|" we get error: CT: CT-101-bash-4.2# sysctl kernel.core_pattern kernel.core_pattern = |/root/core_test %p UID=%u GID=%g sig=%s CT-101-bash-4.2# sleep 100 & [1] 445 CT-101-bash-4.2# kill -11 445 CT-101-bash-4.2# [1]+ Segmentation fault sleep 100 CT-101-bash-4.2# ll /root total 8 rwxr-xr-x 1 root root 7424 Jan 27 17:28 core_test Host: [root@s143 ~]# less /var/log/messages Jan 28 10:40:42 s143 kernel: [87698.969582] Core dump to |/root/core_test 445 UID=0 GID=0 sig=11 pipe failed Also docker is going to use pipe'ing in coredumps functionality: moby/moby#19289 https://jira.sw.ru/browse/PSBM-43596 v2: split sysctl_virtual in separate patch Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com> Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com> +++ ve, coredump: Fix usercopy warning. Usercopy WARNs about copying ve.core_pattern to user space: vzctl exec e2783e5e-840e-4c9a-9ef2-7ead73afb81c cat /proc/sys/kernel/core_pattern Call Trace: __check_object_size+0x134/0x160 proc_dostring+0x164/0x200 proc_dostring_coredump_virtual+0xb2/0xd0 proc_dostring+0x200/0x200 proc_sys_call_handler+0xa7/0xf0 vfs_read+0x9d/0x150 ksys_read+0x4f/0xb0 do_syscall_64+0x5b/0x1c0 entry_SYSCALL_64_after_hwframe+0x65/0xca Whitelist core_pattern in ve_struct kmem_cache since copying core_pattern is allowed by design. Fixes: e931118 ("ve: Add ve cgroup and ve_hook subsys") https://jira.sw.ru/browse/PSBM-106216 Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com> vz9 change: merge with usercopy warning fixup for ve->core_pattern (cherry picked from vz8 commit f8c44aa) Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Feature: sysctl: virtualize "kernel.core_pattern"
1) put core_pattern on ve_struct and add virtualized proc_handler using macro sysctl_virtual() 2) use in-container khelper kthread for collecting cores We need support of pipe'ing coredump in CT. If process crashes in CT and kernel.core_pattern begins with "|" we get error: CT: CT-101-bash-4.2# sysctl kernel.core_pattern kernel.core_pattern = |/root/core_test %p UID=%u GID=%g sig=%s CT-101-bash-4.2# sleep 100 & [1] 445 CT-101-bash-4.2# kill -11 445 CT-101-bash-4.2# [1]+ Segmentation fault sleep 100 CT-101-bash-4.2# ll /root total 8 rwxr-xr-x 1 root root 7424 Jan 27 17:28 core_test Host: [root@s143 ~]# less /var/log/messages Jan 28 10:40:42 s143 kernel: [87698.969582] Core dump to |/root/core_test 445 UID=0 GID=0 sig=11 pipe failed Also docker is going to use pipe'ing in coredumps functionality: moby/moby#19289 https://jira.sw.ru/browse/PSBM-43596 v2: split sysctl_virtual in separate patch Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com> Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com> +++ ve, coredump: Fix usercopy warning. Usercopy WARNs about copying ve.core_pattern to user space: vzctl exec e2783e5e-840e-4c9a-9ef2-7ead73afb81c cat /proc/sys/kernel/core_pattern Call Trace: __check_object_size+0x134/0x160 proc_dostring+0x164/0x200 proc_dostring_coredump_virtual+0xb2/0xd0 proc_dostring+0x200/0x200 proc_sys_call_handler+0xa7/0xf0 vfs_read+0x9d/0x150 ksys_read+0x4f/0xb0 do_syscall_64+0x5b/0x1c0 entry_SYSCALL_64_after_hwframe+0x65/0xca Whitelist core_pattern in ve_struct kmem_cache since copying core_pattern is allowed by design. Fixes: e931118 ("ve: Add ve cgroup and ve_hook subsys") https://jira.sw.ru/browse/PSBM-106216 Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com> vz9 change: merge with usercopy warning fixup for ve->core_pattern (cherry picked from vz8 commit f8c44aa) Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Feature: sysctl: virtualize "kernel.core_pattern"
1) put core_pattern on ve_struct and add virtualized proc_handler using macro sysctl_virtual() 2) use in-container khelper kthread for collecting cores We need support of pipe'ing coredump in CT. If process crashes in CT and kernel.core_pattern begins with "|" we get error: CT: CT-101-bash-4.2# sysctl kernel.core_pattern kernel.core_pattern = |/root/core_test %p UID=%u GID=%g sig=%s CT-101-bash-4.2# sleep 100 & [1] 445 CT-101-bash-4.2# kill -11 445 CT-101-bash-4.2# [1]+ Segmentation fault sleep 100 CT-101-bash-4.2# ll /root total 8 rwxr-xr-x 1 root root 7424 Jan 27 17:28 core_test Host: [root@s143 ~]# less /var/log/messages Jan 28 10:40:42 s143 kernel: [87698.969582] Core dump to |/root/core_test 445 UID=0 GID=0 sig=11 pipe failed Also docker is going to use pipe'ing in coredumps functionality: moby/moby#19289 https://jira.sw.ru/browse/PSBM-43596 v2: split sysctl_virtual in separate patch Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com> Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com> +++ ve, coredump: Fix usercopy warning. Usercopy WARNs about copying ve.core_pattern to user space: vzctl exec e2783e5e-840e-4c9a-9ef2-7ead73afb81c cat /proc/sys/kernel/core_pattern Call Trace: __check_object_size+0x134/0x160 proc_dostring+0x164/0x200 proc_dostring_coredump_virtual+0xb2/0xd0 proc_dostring+0x200/0x200 proc_sys_call_handler+0xa7/0xf0 vfs_read+0x9d/0x150 ksys_read+0x4f/0xb0 do_syscall_64+0x5b/0x1c0 entry_SYSCALL_64_after_hwframe+0x65/0xca Whitelist core_pattern in ve_struct kmem_cache since copying core_pattern is allowed by design. Fixes: e931118 ("ve: Add ve cgroup and ve_hook subsys") https://jira.sw.ru/browse/PSBM-106216 Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com> vz9 change: merge with usercopy warning fixup for ve->core_pattern (cherry picked from vz8 commit f8c44aa) Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Feature: sysctl: virtualize "kernel.core_pattern"
1) put core_pattern on ve_struct and add virtualized proc_handler using macro sysctl_virtual() 2) use in-container khelper kthread for collecting cores We need support of pipe'ing coredump in CT. If process crashes in CT and kernel.core_pattern begins with "|" we get error: CT: CT-101-bash-4.2# sysctl kernel.core_pattern kernel.core_pattern = |/root/core_test %p UID=%u GID=%g sig=%s CT-101-bash-4.2# sleep 100 & [1] 445 CT-101-bash-4.2# kill -11 445 CT-101-bash-4.2# [1]+ Segmentation fault sleep 100 CT-101-bash-4.2# ll /root total 8 rwxr-xr-x 1 root root 7424 Jan 27 17:28 core_test Host: [root@s143 ~]# less /var/log/messages Jan 28 10:40:42 s143 kernel: [87698.969582] Core dump to |/root/core_test 445 UID=0 GID=0 sig=11 pipe failed Also docker is going to use pipe'ing in coredumps functionality: moby/moby#19289 https://jira.sw.ru/browse/PSBM-43596 v2: split sysctl_virtual in separate patch Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com> Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com> +++ ve, coredump: Fix usercopy warning. Usercopy WARNs about copying ve.core_pattern to user space: vzctl exec e2783e5e-840e-4c9a-9ef2-7ead73afb81c cat /proc/sys/kernel/core_pattern Call Trace: __check_object_size+0x134/0x160 proc_dostring+0x164/0x200 proc_dostring_coredump_virtual+0xb2/0xd0 proc_dostring+0x200/0x200 proc_sys_call_handler+0xa7/0xf0 vfs_read+0x9d/0x150 ksys_read+0x4f/0xb0 do_syscall_64+0x5b/0x1c0 entry_SYSCALL_64_after_hwframe+0x65/0xca Whitelist core_pattern in ve_struct kmem_cache since copying core_pattern is allowed by design. Fixes: e931118 ("ve: Add ve cgroup and ve_hook subsys") https://jira.sw.ru/browse/PSBM-106216 Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com> vz9 change: merge with usercopy warning fixup for ve->core_pattern (cherry picked from vz8 commit f8c44aa) Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Feature: sysctl: virtualize "kernel.core_pattern"
1) put core_pattern on ve_struct and add virtualized proc_handler using macro sysctl_virtual() 2) use in-container khelper kthread for collecting cores We need support of pipe'ing coredump in CT. If process crashes in CT and kernel.core_pattern begins with "|" we get error: CT: CT-101-bash-4.2# sysctl kernel.core_pattern kernel.core_pattern = |/root/core_test %p UID=%u GID=%g sig=%s CT-101-bash-4.2# sleep 100 & [1] 445 CT-101-bash-4.2# kill -11 445 CT-101-bash-4.2# [1]+ Segmentation fault sleep 100 CT-101-bash-4.2# ll /root total 8 rwxr-xr-x 1 root root 7424 Jan 27 17:28 core_test Host: [root@s143 ~]# less /var/log/messages Jan 28 10:40:42 s143 kernel: [87698.969582] Core dump to |/root/core_test 445 UID=0 GID=0 sig=11 pipe failed Also docker is going to use pipe'ing in coredumps functionality: moby/moby#19289 https://jira.sw.ru/browse/PSBM-43596 v2: split sysctl_virtual in separate patch Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com> Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com> +++ ve, coredump: Fix usercopy warning. Usercopy WARNs about copying ve.core_pattern to user space: vzctl exec e2783e5e-840e-4c9a-9ef2-7ead73afb81c cat /proc/sys/kernel/core_pattern Call Trace: __check_object_size+0x134/0x160 proc_dostring+0x164/0x200 proc_dostring_coredump_virtual+0xb2/0xd0 proc_dostring+0x200/0x200 proc_sys_call_handler+0xa7/0xf0 vfs_read+0x9d/0x150 ksys_read+0x4f/0xb0 do_syscall_64+0x5b/0x1c0 entry_SYSCALL_64_after_hwframe+0x65/0xca Whitelist core_pattern in ve_struct kmem_cache since copying core_pattern is allowed by design. Fixes: e931118 ("ve: Add ve cgroup and ve_hook subsys") https://jira.sw.ru/browse/PSBM-106216 Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com> vz9 change: merge with usercopy warning fixup for ve->core_pattern (cherry picked from vz8 commit f8c44aa) Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Feature: sysctl: virtualize "kernel.core_pattern"
1) put core_pattern on ve_struct and add virtualized proc_handler using macro sysctl_virtual() 2) use in-container khelper kthread for collecting cores We need support of pipe'ing coredump in CT. If process crashes in CT and kernel.core_pattern begins with "|" we get error: CT: CT-101-bash-4.2# sysctl kernel.core_pattern kernel.core_pattern = |/root/core_test %p UID=%u GID=%g sig=%s CT-101-bash-4.2# sleep 100 & [1] 445 CT-101-bash-4.2# kill -11 445 CT-101-bash-4.2# [1]+ Segmentation fault sleep 100 CT-101-bash-4.2# ll /root total 8 rwxr-xr-x 1 root root 7424 Jan 27 17:28 core_test Host: [root@s143 ~]# less /var/log/messages Jan 28 10:40:42 s143 kernel: [87698.969582] Core dump to |/root/core_test 445 UID=0 GID=0 sig=11 pipe failed Also docker is going to use pipe'ing in coredumps functionality: moby/moby#19289 https://jira.sw.ru/browse/PSBM-43596 v2: split sysctl_virtual in separate patch Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com> Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com> +++ ve, coredump: Fix usercopy warning. Usercopy WARNs about copying ve.core_pattern to user space: vzctl exec e2783e5e-840e-4c9a-9ef2-7ead73afb81c cat /proc/sys/kernel/core_pattern Call Trace: __check_object_size+0x134/0x160 proc_dostring+0x164/0x200 proc_dostring_coredump_virtual+0xb2/0xd0 proc_dostring+0x200/0x200 proc_sys_call_handler+0xa7/0xf0 vfs_read+0x9d/0x150 ksys_read+0x4f/0xb0 do_syscall_64+0x5b/0x1c0 entry_SYSCALL_64_after_hwframe+0x65/0xca Whitelist core_pattern in ve_struct kmem_cache since copying core_pattern is allowed by design. Fixes: e931118 ("ve: Add ve cgroup and ve_hook subsys") https://jira.sw.ru/browse/PSBM-106216 Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com> vz9 change: merge with usercopy warning fixup for ve->core_pattern (cherry picked from vz8 commit f8c44aa) Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Feature: sysctl: virtualize "kernel.core_pattern"
In the current docker, we can only use the system global config of /proc/sys/kernel/core_pattern to specify the output place of core dump in container. There are several problems in this way:
to store the core dump out of the container.
One proposal of implementation steps:
Introduce "--coredump-helper" option in docker daemon, this option enables and specifies core dump helper program.
E.g.:
docker daemon --coredump-helper=/usr/libexec/docker-coredump-helper
docker-coredump-helper is an executable program built from a project of docker-coredump-helper (it doesn't exsist now, also need to be implemented).
Process steps:
If the value of "--coredump-helper" isn't specified, docker daemon need not do the above steps.
Introduce "--core-pattern" option in docker run/create, this option specifies the container core pattern.
E.g.:
a)
docker run --core-pattern="#/var/core.%s.%p.%e" [IMAGE] [CMD]
// path with '#' means it would be in host mnt namespaceb)
docker run --core-pattern="/var/core.%s.%p.%e" [IMAGE] [CMD]
// path is in the container mnt namespacec)
docker run [IMAGE] [CMD]
// if "--core-pattern" not specified, default as: "#/var/run/docker/core_files/[ContainerID]/core.%p"Process steps:
The text was updated successfully, but these errors were encountered: