Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 912394 - www-apps/gitea-1.21.7 - modules/.../bindata.go:3626: syntax error: unexpected EOF in argument list; possibly missing comma or )
Summary: www-apps/gitea-1.21.7 - modules/.../bindata.go:3626: syntax error: unexpected...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Ryan Tsien
URL:
Whiteboard:
Keywords:
: 814614 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-08-17 09:17 UTC by Toralf Förster
Modified: 2024-02-26 11:58 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,18.10 KB, text/plain)
2023-08-17 09:17 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,79.24 KB, text/plain)
2023-08-17 09:17 UTC, Toralf Förster
Details
environment (environment,94.60 KB, text/plain)
2023-08-17 09:17 UTC, Toralf Förster
Details
etc.clang.tar.xz (etc.clang.tar.xz,788 bytes, application/x-xz)
2023-08-17 09:17 UTC, Toralf Förster
Details
etc.portage.tar.xz (etc.portage.tar.xz,15.77 KB, application/x-xz)
2023-08-17 09:17 UTC, Toralf Förster
Details
www-apps:gitea-1.19.3:20230817-085436.log (www-apps:gitea-1.19.3:20230817-085436.log,88.95 KB, text/plain)
2023-08-17 09:17 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2023-08-17 09:17:26 UTC
github.com/klauspost/compress/zstd
code.gitea.io/gitea/modules/public
github.com/dlclark/regexp2/syntax
github.com/goccy/go-json/internal/encoder/vm_color
# code.gitea.io/gitea/modules/public
modules/public/bindata.go:3626:30: string not terminated
modules/public/bindata.go:3626: syntax error: unexpected EOF in argument list; possibly missing comma or )
gopkg.in/yaml.v2
modules/public/public_test.go

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_desktop_plasma-20230815-233036

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-13 *
clang/llvm (if any):
clang version 16.0.6
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/16/bin
Configuration file: /etc/clang/clang.cfg
/usr/lib/llvm/16
16.0.6
Python 3.11.4
Available Rust versions:
  [1]   rust-bin-1.71.1 *
The following VMs are available for generation-2:
*)	Eclipse Temurin JDK 17.0.7_p7 [openjdk-bin-17]
Available Java Virtual Machines:
  [1]   openjdk-bin-17  system-vm

php cli (if any):
go version go1.21.0 linux/amd64

  HEAD of ::gentoo
commit 4bbf4f5929b3cd5d3b713ff5ccbd8687b4f95e85
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Thu Aug 17 08:01:41 2023 +0000

    2023-08-17 08:01:40 UTC

emerge -qpvO www-apps/gitea
[ebuild  N    ] www-apps/gitea-1.19.3  USE="acct filecaps pam -pie -sqlite"
Comment 1 Toralf Förster gentoo-dev 2023-08-17 09:17:27 UTC
Created attachment 868064 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2023-08-17 09:17:28 UTC
Created attachment 868065 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2023-08-17 09:17:30 UTC
Created attachment 868066 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2023-08-17 09:17:30 UTC
Created attachment 868067 [details]
etc.clang.tar.xz
Comment 5 Toralf Förster gentoo-dev 2023-08-17 09:17:31 UTC
Created attachment 868068 [details]
etc.portage.tar.xz
Comment 6 Toralf Förster gentoo-dev 2023-08-17 09:17:32 UTC
The file size of ./files/temp.tar.xz is too big (82M) for an upload. For few weeks the link http://tinderbox.zwiebeltoralf.de:31560/17.1_desktop_plasma-20230815-233036/var/tmp/tb/issues/20230817-085552-www-apps_gitea-1.19.3/files/temp.tar.xz is valid.
Comment 7 Toralf Förster gentoo-dev 2023-08-17 09:17:33 UTC
Created attachment 868069 [details]
www-apps:gitea-1.19.3:20230817-085436.log
Comment 8 Ryan Tsien 2023-11-17 12:56:31 UTC
*** Bug 814614 has been marked as a duplicate of this bug. ***
Comment 9 Ryan Tsien 2023-11-17 13:57:01 UTC
Can't reproduce this problem with the same golang version (1.21.0), the same gitea src tarball (sha512sum e77372f2354d433f7703d49c3d30238bad3ad6cd0722d4e0fa374692a8a0d6314bb8327807ec2b992ec84de420e09d48aaa3af16ad37b0ee0beb5540f395688f) and all the same compilation options on amd64.

File `module/public/bindata.go` is generated by `build/generate-bindata.go` with github.com/shurcooL/vfsgen, however the original generated bindata.go file in question is missing, so I have to wait for the next exception to analyze it further.
Comment 10 Yixun Lan archtester gentoo-dev 2023-12-01 00:10:22 UTC
em, I hit this in www-apps/gitea-1.21.1, where with dev-lang/go-1.21.4 installed

# code.gitea.io/gitea/modules/public
modules/public/bindata.go:3144:30: string not terminated
modules/public/bindata.go:3144: syntax error: unexpected EOF in argument list; possibly missing comma or )
code.gitea.io/gitea/services/auth/source/sspi
Comment 11 Ryan Tsien 2023-12-01 01:07:57 UTC
(In reply to Yixun Lan from comment #10)
> em, I hit this in www-apps/gitea-1.21.1, where with dev-lang/go-1.21.4
> installed
> 
> # code.gitea.io/gitea/modules/public
> modules/public/bindata.go:3144:30: string not terminated
> modules/public/bindata.go:3144: syntax error: unexpected EOF in argument
> list; possibly missing comma or )
> code.gitea.io/gitea/services/auth/source/sspi

The bindata is generated when installing gitea, can you post it?
Comment 12 Yixun Lan archtester gentoo-dev 2023-12-02 13:21:45 UTC
(In reply to Ryan Qian from comment #11)
> The bindata is generated when installing gitea, can you post it?

https://dev.gentoo.org/~dlan/logs/bindata.go.xz

the file is too large, so I put it here
Comment 13 Ryan Tsien 2023-12-02 22:44:41 UTC
I have analysed the problem and found that:

1. the generated bindata.go file is fine, compare the hash of the re-generated bindata.go file with the hash of the file above and confirm that they are the same.
2. using the entire /var/tmp/portage/www-apps/gitea-1.21.1 environment which this problem was reproduced, the build passes with just `make gitea` (without regenerating the bindata.go file)
3. I've checked the Go source code and found the relevant code for this problem in the 'src/cmd/compile/internal/syntax' path, here's a detailed trace of the problem:


> ```
> syntax -> parser -> scanner -> source
> 
> 
> (syntax -> read file -> io.Reader)
>     |
>    ...
>     |
>     V
> token: got _Lparen  // `(`
>     |
>     V
> // start from the following `"` character
> scanner.next()  -->   scanner.stdString()  -->  source.nextch()
>     |                                               |
>     |                                               V
>     |                                           EOF source.ch = -1  **the key problem!!**
>     |                                               |
>     |                                               V
>     |                                           "string not terminated" error
>     |
>     V
> parser: argList() -> list() -> expr() -> binaryExpr() -> scanner.next()
>                         |                                   |
>                         |                                   V
>                         |                                source.ch == -1
>                         |                                   |
>                         |                                   V
>                         |                                source.lit = "EOF"
>                         |                                source.tok = _Semi
>                         |
>                         V
>                     syntaxError()
>                     // "syntax error: unexpected EOF in argument list; possibly missing comma or )"
> ```

So far it looks like it was compiled without reading the whole file, but the file itself is complete.

I'll keep going for deeper reasons.
Comment 14 Agostino Sarubbo gentoo-dev 2024-02-24 07:30:25 UTC
ci has reproduced this issue with version 1.21.6 - Updating summary.
Comment 15 Agostino Sarubbo gentoo-dev 2024-02-26 11:45:59 UTC
ci has reproduced this issue with version 1.21.7 - Updating summary.
Comment 16 Ryan Tsien 2024-02-26 11:58:43 UTC
(In reply to Agostino Sarubbo from comment #15)
> ci has reproduced this issue with version 1.21.7 - Updating summary.

So weird, I've never reproduced the problem locally, so far it seems to be caused by an incomplete read of the bindata file within a short period of time after it was generated.