[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Minios-devel] [UNIKRAFT NGINX v3 6/8] patches: Fix runtime issues



Reviewed-by: Costin Lupu <costin.lupu@xxxxxxxxx>


On 10/29/19 10:56 PM, Mihai Pogonaru wrote:
> The first patch disables the setting of the process title in Nginx. This
> is done because of the way Nginx accomplishes this on Linux -it can be
> found as a comment in ngx_setproctitle.c- which would not work in Unikraft.
> 
> The second patch disables semaphore sharing between processes in Nginx.
> 
> Signed-off-by: Mihai Pogonaru <pogonarumihai@xxxxxxxxx>
> ---
>  ...e-main-and-force-setproctitle-to-be-a-nop.patch | 25 ++++++++++++++++++++
>  ...edded-does-not-allow-semaphores-shared-be.patch | 27 
> ++++++++++++++++++++++
>  2 files changed, 52 insertions(+)
>  create mode 100644 
> patches/0001-Rename-main-and-force-setproctitle-to-be-a-nop.patch
>  create mode 100644 
> patches/0002-pthread-embedded-does-not-allow-semaphores-shared-be.patch
> 
> diff --git 
> a/patches/0001-Rename-main-and-force-setproctitle-to-be-a-nop.patch 
> b/patches/0001-Rename-main-and-force-setproctitle-to-be-a-nop.patch
> new file mode 100644
> index 0000000..bf18fc9
> --- /dev/null
> +++ b/patches/0001-Rename-main-and-force-setproctitle-to-be-a-nop.patch
> @@ -0,0 +1,25 @@
> +From f6c9df931cd57fd9670a3ed8218d0fb5e262a03e Mon Sep 17 00:00:00 2001
> +From: Mihai Pogonaru <pogonarumihai@xxxxxxxxx>
> +Date: Sat, 1 Jun 2019 02:03:51 +0300
> +Subject: [PATCH] Rename main and force setproctitle to be a nop
> +
> +---
> + src/os/unix/ngx_setproctitle.h | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/src/os/unix/ngx_setproctitle.h b/src/os/unix/ngx_setproctitle.h
> +index c363662..0f9acbe 100644
> +--- a/src/os/unix/ngx_setproctitle.h
> ++++ b/src/os/unix/ngx_setproctitle.h
> +@@ -29,7 +29,7 @@
> + ngx_int_t ngx_init_setproctitle(ngx_log_t *log);
> + void ngx_setproctitle(char *title);
> + 
> +-#elif (NGX_LINUX) || (NGX_DARWIN)
> ++#elif 0 //(NGX_LINUX) || (NGX_DARWIN)
> + 
> + #define NGX_SETPROCTITLE_USES_ENV  1
> + #define NGX_SETPROCTITLE_PAD       '\0'
> +-- 
> +2.11.0
> +
> diff --git 
> a/patches/0002-pthread-embedded-does-not-allow-semaphores-shared-be.patch 
> b/patches/0002-pthread-embedded-does-not-allow-semaphores-shared-be.patch
> new file mode 100644
> index 0000000..dc8b94b
> --- /dev/null
> +++ b/patches/0002-pthread-embedded-does-not-allow-semaphores-shared-be.patch
> @@ -0,0 +1,27 @@
> +From 30557083a93221ea1e5817c60bad16d4bd13a16c Mon Sep 17 00:00:00 2001
> +From: Mihai Pogonaru <pogonarumihai@xxxxxxxxx>
> +Date: Fri, 14 Jun 2019 01:31:43 +0300
> +Subject: [PATCH] pthread-embedded does not allow semaphores shared between
> + processes
> +
> +Signed-off-by: Mihai Pogonaru <pogonarumihai@xxxxxxxxx>
> +---
> + src/core/ngx_shmtx.c | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/src/core/ngx_shmtx.c b/src/core/ngx_shmtx.c
> +index a255903..6da5cab 100644
> +--- a/src/core/ngx_shmtx.c
> ++++ b/src/core/ngx_shmtx.c
> +@@ -30,7 +30,7 @@ ngx_shmtx_create(ngx_shmtx_t *mtx, ngx_shmtx_sh_t *addr, 
> u_char *name)
> + 
> +     mtx->wait = &addr->wait;
> + 
> +-    if (sem_init(&mtx->sem, 1, 0) == -1) {
> ++    if (sem_init(&mtx->sem, 0, 0) == -1) {
> +         ngx_log_error(NGX_LOG_ALERT, ngx_cycle->log, ngx_errno,
> +                       "sem_init() failed");
> +     } else {
> +-- 
> +2.11.0
> +
> 

_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.