Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 1320698 Details for
Bug 1466944
Odd NFS client hangs that go away after restarting gssproxy
Home
New
Search
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh90 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
[?]
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Very WIP patch to allow some client side debugging
0001-WIP-add-some-client-side-debugging.patch (text/plain), 4.68 KB, created by
Simo Sorce
on 2017-08-31 18:57:17 UTC
(
hide
)
Description:
Very WIP patch to allow some client side debugging
Filename:
MIME Type:
Creator:
Simo Sorce
Created:
2017-08-31 18:57:17 UTC
Size:
4.68 KB
patch
obsolete
>From 7f7ef279ccc34b9b25557b0ed543aa0d5412e379 Mon Sep 17 00:00:00 2001 >From: Simo Sorce <simo@redhat.com> >Date: Thu, 31 Aug 2017 14:50:20 -0400 >Subject: [PATCH] WIP: add some client side debugging > >Signed-off-by: Simo Sorce <simo@redhat.com> >--- > proxy/src/client/gpm_common.c | 68 +++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 68 insertions(+) > >diff --git a/proxy/src/client/gpm_common.c b/proxy/src/client/gpm_common.c >index 0200ecd..407dbc4 100644 >--- a/proxy/src/client/gpm_common.c >+++ b/proxy/src/client/gpm_common.c >@@ -37,6 +37,9 @@ struct gpm_ctx gpm_global_ctx; > > pthread_once_t gpm_init_once_control = PTHREAD_ONCE_INIT; > >+/* turns on debuggin to stderr */ >+int gpm_client_debug = 0; >+ > static void gpm_init_once(void) > { > pthread_mutexattr_t attr; >@@ -222,6 +225,27 @@ static int gpm_timer_setup(struct gpm_ctx *gpmctx, int timeout_seconds) { > return 0; > } > >+static void gpm_timer_debug(struct gpm_ctx *gpmctx) >+{ >+ struct itimerspec its = {}; >+ int ret; >+ >+ if (gpmctx->timerfd == -1) { >+ fprintf(stderr, "No timer fd ?!\n"); >+ return; >+ } >+ >+ ret = timerfd_gettime(gpmctx->timerfd, &its); >+ if (ret) { >+ ret = errno; >+ fprintf(stderr, "timerfd_gettime() failed (%d, %s)\n", >+ ret, strerror(ret)); >+ return; >+ } >+ fprintf(stderr, "Timer remaining: %ld:%ld\n", >+ its.it_value.tv_sec, its.it_value.tv_nsec); >+} >+ > static void gpm_epoll_close(struct gpm_ctx *gpmctx) { > if (gpmctx->epollfd < 0) { > return; >@@ -358,6 +382,11 @@ static int gpm_send_buffer(struct gpm_ctx *gpmctx, > retry = false; > do { > do { >+ if (gpm_client_debug) { >+ fprintf(stderr, "send_buffer, rec len = %u\n", length); >+ gpm_timer_debug(gpmctx); >+ } >+ > ret = gpm_epoll_wait(gpmctx, EPOLLOUT); > if (ret != 0) { > goto done; >@@ -387,6 +416,11 @@ static int gpm_send_buffer(struct gpm_ctx *gpmctx, > > pos = 0; > while (length > pos) { >+ if (gpm_client_debug) { >+ fprintf(stderr, "send_buffer, rec pos = %u\n", (uint32_t)pos); >+ gpm_timer_debug(gpmctx); >+ } >+ > ret = gpm_epoll_wait(gpmctx, EPOLLOUT); > if (ret) { > goto done; >@@ -442,6 +476,11 @@ static int gpm_recv_buffer(struct gpm_ctx *gpmctx, > *length = ntohl(size); > *length &= ~FRAGMENT_BIT; > >+ if (gpm_client_debug) { >+ fprintf(stderr, "recv_buffer, rec len = %u\n", *length); >+ gpm_timer_debug(gpmctx); >+ } >+ > if (*length > MAX_RPC_SIZE) { > ret = EMSGSIZE; > goto done; >@@ -455,6 +494,12 @@ static int gpm_recv_buffer(struct gpm_ctx *gpmctx, > > pos = 0; > while (*length > pos) { >+ if (gpm_client_debug) { >+ fprintf(stderr, >+ "recv_buffer (cont), rec pos = %u\n", (uint32_t)pos); >+ gpm_timer_debug(gpmctx); >+ } >+ > ret = gpm_epoll_wait(gpmctx, EPOLLIN); > if (ret) { > goto done; >@@ -503,10 +548,14 @@ static uint32_t gpm_next_xid(struct gpm_ctx *gpmctx) > > static struct gpm_ctx *gpm_get_ctx(void) > { >+ const char *gpm_debug; > int ret; > > pthread_once(&gpm_init_once_control, gpm_init_once); > >+ gpm_debug = gp_getenv("GSSPROXY_CLIENT_DEBUG"); >+ if (gpm_debug) gpm_client_debug = 1; >+ > ret = gpm_grab_sock(&gpm_global_ctx); > if (ret) { > return NULL; >@@ -528,6 +577,13 @@ static int gpm_send_recv_loop(struct gpm_ctx *gpmctx, char *send_buffer, > return ret; > > for (retry_count = 0; retry_count < MAX_TIMEOUT_RETRY; retry_count++) { >+ >+ if (gpm_client_debug) { >+ fprintf(stderr, "send_buffer, len = %u, retry = %d\n", >+ send_length, retry_count); >+ gpm_timer_debug(gpmctx); >+ } >+ > /* send to proxy */ > ret = gpm_send_buffer(gpmctx, send_buffer, send_length); > >@@ -549,6 +605,17 @@ static int gpm_send_recv_loop(struct gpm_ctx *gpmctx, char *send_buffer, > > /* receive answer */ > ret = gpm_recv_buffer(gpmctx, recv_buffer, recv_length); >+ >+ if (gpm_client_debug) { >+ if (ret == 0) { >+ fprintf(stderr, "recv_buffer, len = %u, retry = %d\n", >+ *recv_length, retry_count); >+ } else { >+ fprintf(stderr, "recv failed! (%d, %s)\n", ret, strerror(ret)); >+ } >+ gpm_timer_debug(gpmctx); >+ } >+ > if (ret == 0) { > /* No error */ > break; >@@ -567,6 +634,7 @@ static int gpm_send_recv_loop(struct gpm_ctx *gpmctx, char *send_buffer, > /* Other error */ > return ret; > } >+ > } > > return ret; >-- >2.9.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1466944
:
1320678
| 1320698