It looks like you have a bad facility in the active_facility_list? I'm
not sure how this could happen, though. What's your config?
Daniel
On 7/17/20 3:36 PM, Becker, Jeffrey C. (ARC-TN)[InuTeq, LLC] via Devel
wrote:
My bad - I added the format string to get a slightly different
traceback below (as I explained to Frank Filz, I originally had the call you suggest
without errstr, and got pretty much the same segfault). I'll keep exploring in gdb.
Advice appreciated. Thanks.
-Jeff
Program received signal SIGSEGV, Segmentation fault.
0x00002aaaaad43cac in display_log_component_level (component=COMPONENT_NFS_V4,
file=0x2aaaaae4d5f8
"/mnt/nbnfs2/jcbecker/reexporter/nfs-ganesha/src/uidmap/uidmap.c", line=519,
function=0x2aaaaae4d7fb <__func__.18797> "um_load",
level=NIV_WARN, format=0x2aaaaae4d7ed "%s", arguments=0x7fffffff2718)
at /mnt/nbnfs2/jcbecker/reexporter/nfs-ganesha/src/log/log_functions.c:1519
1519 if (level <= facility->lf_max_level
(gdb) where
#0 0x00002aaaaad43cac in display_log_component_level (
component=COMPONENT_NFS_V4,
file=0x2aaaaae4d5f8
"/mnt/nbnfs2/jcbecker/reexporter/nfs-ganesha/src/uidmap/uidmap.c", line=519,
function=0x2aaaaae4d7fb <__func__.18797> "um_load",
level=NIV_WARN, format=0x2aaaaae4d7ed "%s", arguments=0x7fffffff2718)
at /mnt/nbnfs2/jcbecker/reexporter/nfs-ganesha/src/log/log_functions.c:1519
#1 0x00002aaaaad43dfe in DisplayLogComponentLevel (
component=COMPONENT_NFS_V4,
file=0x2aaaaae4d5f8
"/mnt/nbnfs2/jcbecker/reexporter/nfs-ganesha/src/uidmap/uidmap.c", line=519,
function=0x2aaaaae4d7fb <__func__.18797> "um_load",
level=NIV_WARN, format=0x2aaaaae4d7ed "%s")
at /mnt/nbnfs2/jcbecker/reexporter/nfs-ganesha/src/log/log_functions.c:1704
#2 0x000
On 7/17/20, 11:42 AM, "Daniel Gryniewicz" <dang(a)redhat.com> wrote:
LogWarn() (and the others like it) are printf-alikes, so they need a
format parameter. It would be called like this:
LogWarn(COMPONENT_NFS_V4, "%s", errstr);
But, you don't need the errstr at all, you can just call like this:
LogWarn(COMPONENT_NFS_V4, "Invalid map: %s: %s", clue, line);
Daniel
On 7/17/20 12:52 PM, Becker, Jeffrey C. (ARC-TN)[InuTeq, LLC] via Devel
wrote:
> Hi,
>
> I’m trying to call your logging as follows:
>
> sprintf(errstr, "Invalid map: %s: %s", clue, line);
>
> LogWarn(COMPONENT_NFS_V4, errstr);
>
> I’m getting a segfault in LogWarn.
>
> Program received signal SIGSEGV, Segmentation fault.
>
> 0x00002aaaaad43ca4 in display_log_component_level
> (component=COMPONENT_NFS_V4,
>
> file=0x2aaaaae4d5d8
> "/mnt/nbnfs2/jcbecker/reexporter/nfs-ganesha/src/uidmap/uidmap.c",
> line=519, function=0x2aaaaae4d7d8 <__func__.18797> "um_load",
>
> level=NIV_WARN,
>
> format=0x7fffffffc470 "Invalid map: unknown_user: dataset:
> 129.99.10.111 \t21102:61856 dataset n1856", arguments=0x7fffffff2718)
>
> at
> /mnt/nbnfs2/jcbecker/reexporter/nfs-ganesha/src/log/log_functions.c:1519
>
> 1519 if (level <=
> facility->lf_max_level
>
> The traceback is below. I’m investigating, but any advice is welcome.
> Thanks.
>
> -Jeff
>
> (gdb) where
>
> #0 0x00002aaaaad43ca4 in display_log_component_level (
>
> component=COMPONENT_NFS_V4,
>
> file=0x2aaaaae4d5d8
> "/mnt/nbnfs2/jcbecker/reexporter/nfs-ganesha/src/uidmap/uidmap.c",
> line=519, function=0x2aaaaae4d7d8 <__func__.18797> "um_load",
>
> level=NIV_WARN,
>
> format=0x7fffffffc470 "Invalid map: unknown_user: dataset:
> 129.99.10.111 \t21102:61856 dataset n1856", arguments=0x7fffffff2718)
>
> at
> /mnt/nbnfs2/jcbecker/reexporter/nfs-ganesha/src/log/log_functions.c:1519
>
> #1 0x00002aaaaad43df6 in DisplayLogComponentLevel (
>
> component=COMPONENT_NFS_V4,
>
> file=0x2aaaaae4d5d8
> "/mnt/nbnfs2/jcbecker/reexporter/nfs-ganesha/src/uidmap/uidmap.c",
> line=519, function=0x2aaaaae4d7d8 <__func__.18797> "um_load",
>
> level=NIV_WARN,
>
> format=0x7fffffffc470 "Invalid map: unknown_user: dataset:
> 129.99.10.111 \t21102:61856 dataset n1856")
>
> at
> /mnt/nbnfs2/jcbecker/reexporter/nfs-ganesha/src/log/log_functions.c:1704
>
>
> _______________________________________________
> Devel mailing list -- devel(a)lists.nfs-ganesha.org
> To unsubscribe send an email to devel-leave(a)lists.nfs-ganesha.org
>
_______________________________________________
Devel mailing list -- devel(a)lists.nfs-ganesha.org
To unsubscribe send an email to devel-leave(a)lists.nfs-ganesha.org