I did a quick search for "is not a defined function".  That message appears 
once in https://go.dev/src/text/template/exec.go.  It's triggered when 
findFunction() fails while executing a template.

Hope that's of some use.


On Wednesday, October 19, 2022 at 8:20:46 AM UTC-4 rit...@ext.dunzo.in 
wrote:

>
> We are facing a strange issue within one of our services where randomly 
> one of the docker containers in production out of (N,  N>50)  starts 
> randomly failing on an API while trying to execute a golang template with 
> an error *"Err: template: <template name>: executing \"<template name>\" 
> at len: \"len\" is not a defined function".  *`len` is a builtin function 
> within golang so am stumped why this error comes.  Some more context
>
>
>    - *Golang Version: 1.15*
>    - The same Pod was serving this API and executing the template 
>    correctly before this issue started coming
>    - Parsing the template works fine, only executing fails. We are 
>    parsing and executing in sequence.
>    - After this error was encountered first, all subsequent API calls to 
>    the same container failed with the same error
>    - The same API on all other containers works perfectly fine.  We 
>    removed the container from serving prod traffic, and this issue disappeared
>    - This is the second time the issue is happening, first time we 
>    restarted the container and hence weren't able to debug much
>    -  Binary is stripped of symbol tables and ptrace is not enabled
>
> We have the container running (not serving prod traffic) so if there are 
> any hints on how to debug this issue would appreciate.
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/5f252adb-4d0c-4d86-bc61-8b3a47be68d9n%40googlegroups.com.

Reply via email to