Cannot run Gitea web on new versions on Raspbian stretch #3068

Closed
opened 2025-11-02 04:59:37 -06:00 by GiteaMirror · 24 comments
Owner

Originally created by @ChrisB85 on GitHub (Mar 19, 2019).

  • Gitea version (or commit ref):
  • Git version:
  • Operating system: Raspbian stretch
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

I'm running Gitea web as a service (version 7780ea8) and it's working fine. When i try to upgrade (versions from 15.03 and above) service fails to start. In syslog i see only this:

Mar 19 07:34:42 raspberrypi systemd[1]: Started Gitea (Git with a cup of tea).
Mar 19 07:34:42 raspberrypi systemd[1]: gitea.service: Main process exited, code=killed, status=4/ILL
Mar 19 07:34:42 raspberrypi systemd[1]: gitea.service: Unit entered failed state.

No errors in Gitea logs. What can be a reason of this behavior and how can I provice more info to investigate?

Originally created by @ChrisB85 on GitHub (Mar 19, 2019). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): - Git version: - Operating system: Raspbian stretch - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [x] No - [ ] Not relevant - Log gist: ## Description I'm running Gitea web as a service (version 7780ea8) and it's working fine. When i try to upgrade (versions from 15.03 and above) service fails to start. In syslog i see only this: ``` Mar 19 07:34:42 raspberrypi systemd[1]: Started Gitea (Git with a cup of tea). Mar 19 07:34:42 raspberrypi systemd[1]: gitea.service: Main process exited, code=killed, status=4/ILL Mar 19 07:34:42 raspberrypi systemd[1]: gitea.service: Unit entered failed state. ``` No errors in Gitea logs. What can be a reason of this behavior and how can I provice more info to investigate?
GiteaMirror added the issue/confirmedtopic/buildissue/duplicate labels 2025-11-02 04:59:37 -06:00
Author
Owner

@lunny commented on GitHub (Mar 19, 2019):

Any error information from your log files?

@lunny commented on GitHub (Mar 19, 2019): Any error information from your log files?
Author
Owner

@ChrisB85 commented on GitHub (Mar 19, 2019):

Unfortunately there are no new entries in gitea.log, http.log or xorm.log when i try to run service.

@ChrisB85 commented on GitHub (Mar 19, 2019): Unfortunately there are no new entries in gitea.log, http.log or xorm.log when i try to run service.
Author
Owner

@lunny commented on GitHub (Mar 19, 2019):

Could you run ./gitea on your terminal?

@lunny commented on GitHub (Mar 19, 2019): Could you run `./gitea` on your terminal?
Author
Owner

@zeripath commented on GitHub (Mar 19, 2019):

Try to replicate as much of the systemd environment as possible when running it from the terminal.

@zeripath commented on GitHub (Mar 19, 2019): Try to replicate as much of the systemd environment as possible when running it from the terminal.
Author
Owner

@ChrisB85 commented on GitHub (Mar 19, 2019):

Could you run ./gitea on your terminal?

root@raspberrypi:/home/git/gitea# ./gitea
Błędna instrukcja
root@raspberrypi:/home/git/gitea# sudo -u git ./gitea
Błędna instrukcja

which means:
Bad instruction/Bad command

@ChrisB85 commented on GitHub (Mar 19, 2019): > Could you run `./gitea` on your terminal? ``` root@raspberrypi:/home/git/gitea# ./gitea Błędna instrukcja ``` ``` root@raspberrypi:/home/git/gitea# sudo -u git ./gitea Błędna instrukcja ``` which means: `Bad instruction/Bad command`
Author
Owner

@zeripath commented on GitHub (Mar 19, 2019):

Ok. What is the contents of the systemd unit file? Use the executable command that is in there.

Paste the systemd unit file here and we should be able to walk you through.

@zeripath commented on GitHub (Mar 19, 2019): Ok. What is the contents of the systemd unit file? Use the executable command that is in there. Paste the systemd unit file here and we should be able to walk you through.
Author
Owner

@ChrisB85 commented on GitHub (Mar 19, 2019):

[Unit]
Description=Gitea (Git with a cup of tea)
After=syslog.target
After=network.target

[Service]
RestartSec=2s
Type=simple
User=git
Group=git
WorkingDirectory=/home/git/gitea
ExecStart=/home/git/gitea/gitea web
Restart=always
Environment=USER=git HOME=/home/git

[Install]
WantedBy=multi-user.target
@ChrisB85 commented on GitHub (Mar 19, 2019): ``` [Unit] Description=Gitea (Git with a cup of tea) After=syslog.target After=network.target [Service] RestartSec=2s Type=simple User=git Group=git WorkingDirectory=/home/git/gitea ExecStart=/home/git/gitea/gitea web Restart=always Environment=USER=git HOME=/home/git [Install] WantedBy=multi-user.target ```
Author
Owner

@zeripath commented on GitHub (Mar 19, 2019):

Ok

sudo -H -u git -i
cd /home/git/gitea
/home/git/gitea/gitea web 
@zeripath commented on GitHub (Mar 19, 2019): Ok ```bash sudo -H -u git -i cd /home/git/gitea /home/git/gitea/gitea web ```
Author
Owner

@ChrisB85 commented on GitHub (Mar 19, 2019):

root@raspberrypi:/home/git/gitea# sudo -H -u git -i
git@raspberrypi:~$ cd /home/git/gitea
git@raspberrypi:~/gitea$ /home/git/gitea/gitea web
Błędna instrukcja
git@raspberrypi:~/gitea$

Still the same effect.

@ChrisB85 commented on GitHub (Mar 19, 2019): ``` root@raspberrypi:/home/git/gitea# sudo -H -u git -i git@raspberrypi:~$ cd /home/git/gitea git@raspberrypi:~/gitea$ /home/git/gitea/gitea web Błędna instrukcja git@raspberrypi:~/gitea$ ``` Still the same effect.
Author
Owner

@lunny commented on GitHub (Mar 19, 2019):

maybe you build wrong architecture binary?

@lunny commented on GitHub (Mar 19, 2019): maybe you build wrong architecture binary?
Author
Owner

@ChrisB85 commented on GitHub (Mar 19, 2019):

I'm using always the same version which is gitea-master-linux-arm-7.
Here is my update script:

service gitea stop
mv /home/git/gitea/gitea-master-linux-arm-7 /home/git/gitea/gitea-master-linux-arm-7.bak
wget -P /home/git/gitea/ https://dl.gitea.io/gitea/master/gitea-master-linux-arm-7
chown git /home/git/gitea/gitea-master-linux-arm-7
chmod 755 /home/git/gitea/gitea-master-linux-arm-7
service gitea start
@ChrisB85 commented on GitHub (Mar 19, 2019): I'm using always the same version which is gitea-master-linux-arm-7. Here is my update script: ``` service gitea stop mv /home/git/gitea/gitea-master-linux-arm-7 /home/git/gitea/gitea-master-linux-arm-7.bak wget -P /home/git/gitea/ https://dl.gitea.io/gitea/master/gitea-master-linux-arm-7 chown git /home/git/gitea/gitea-master-linux-arm-7 chmod 755 /home/git/gitea/gitea-master-linux-arm-7 service gitea start ```
Author
Owner

@zeripath commented on GitHub (Mar 19, 2019):

Well there's your issue. Your executable is called /home/git/gitea/gitea-master-linux-arm-7 not /home/git/gitea/gitea. Either add a link or change the unit file to run /home/git/gitea/gitea-master-linux-arm-7

@zeripath commented on GitHub (Mar 19, 2019): Well there's your issue. Your executable is called `/home/git/gitea/gitea-master-linux-arm-7` not `/home/git/gitea/gitea`. Either add a link or change the unit file to run `/home/git/gitea/gitea-master-linux-arm-7`
Author
Owner

@ChrisB85 commented on GitHub (Mar 19, 2019):

/home/git/gitea/gitea is a simlink to /home/git/gitea/gitea-master-linux-arm-7

root@raspberrypi:/home/git/gitea# sudo -u git ./gitea-master-linux-arm-7
Błędna instrukcja

Once again: everything is working fine when i downgrade to version 7780ea8 by replacing gitea-master-linux-arm-7 file.

@ChrisB85 commented on GitHub (Mar 19, 2019): `/home/git/gitea/gitea` is a simlink to `/home/git/gitea/gitea-master-linux-arm-7` ``` root@raspberrypi:/home/git/gitea# sudo -u git ./gitea-master-linux-arm-7 Błędna instrukcja ``` Once again: everything is working fine when i downgrade to version 7780ea8 by replacing gitea-master-linux-arm-7 file.
Author
Owner

@zeripath commented on GitHub (Mar 19, 2019):

Right so it looks like the the raspberry pi build is broken.

I'll relabel.

@zeripath commented on GitHub (Mar 19, 2019): Right so it looks like the the raspberry pi build is broken. I'll relabel.
Author
Owner

@zeripath commented on GitHub (Mar 19, 2019):

Does file give you any more information? Is it even an arm build?

@zeripath commented on GitHub (Mar 19, 2019): Does `file` give you any more information? Is it even an arm build?
Author
Owner

@ChrisB85 commented on GitHub (Mar 19, 2019):

Working version:

root@raspberrypi:/home/git/gitea# file ./gitea-master-linux-arm-7.bak
./gitea-master-linux-arm-7.bak: ELF 32-bit LSB executable, ARM, EABI5 version 1 (GNU/Linux), statically linked, for GNU/Linux 3.2.0, BuildID[sha1]=4601fe52b9c95357c16de62fd7d18a195f655203, not stripped

New (not working) version:

root@raspberrypi:/home/git/gitea# file ./gitea-master-linux-arm-7
./gitea-master-linux-arm-7: ELF 32-bit LSB executable, ARM, EABI5 version 1 (GNU/Linux), statically linked, for GNU/Linux 3.2.0, BuildID[sha1]=33a3450862210ffba3ed3675d0bb6b6f1c8932ef, not stripped
@ChrisB85 commented on GitHub (Mar 19, 2019): Working version: ``` root@raspberrypi:/home/git/gitea# file ./gitea-master-linux-arm-7.bak ./gitea-master-linux-arm-7.bak: ELF 32-bit LSB executable, ARM, EABI5 version 1 (GNU/Linux), statically linked, for GNU/Linux 3.2.0, BuildID[sha1]=4601fe52b9c95357c16de62fd7d18a195f655203, not stripped ``` New (not working) version: ``` root@raspberrypi:/home/git/gitea# file ./gitea-master-linux-arm-7 ./gitea-master-linux-arm-7: ELF 32-bit LSB executable, ARM, EABI5 version 1 (GNU/Linux), statically linked, for GNU/Linux 3.2.0, BuildID[sha1]=33a3450862210ffba3ed3675d0bb6b6f1c8932ef, not stripped ```
Author
Owner

@KillerLink commented on GitHub (Mar 30, 2019):

I have the same issue. gitea-1.7.3 is running, neither gitea-1.8.0-rc1 nor gitea-1.8.0-rc2 are.
I have tried to investigate a little, here are my current findings:
-> According to gdb, it segfaults before the main function
-> According to strace on gitea-1.8.0-rc2, it looks like a system call might be the problem:

execve("./gitea-1.8.0-rc2-linux-arm-7", ["./gitea-1.8.0-rc2-linux-arm-7"], 0xbe974740 /* 19 vars */) = 0
syscall_0x101cc(0x1fb0d6, 0x5f, 0x1, 0xff8b44, 0x101c4, 0xfe15bd) = -1 (errno 38)
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0xffffffd8} ---
+++ killed by SIGSEGV +++
Segmentation fault

compared to the first 4 lines of strace on gitea-1.7.3 (which is working):

execve("./gitea-1.7.3-linux-arm-7", ["./gitea-1.7.3-linux-arm-7"], 0xbec84740 /* 19 vars */) = 0
uname({sysname="Linux", nodename="odroid", ...}) = 0
brk(NULL)                               = 0x2b50000
brk(0x2b50d0c)                          = 0x2b50d0c

Note that gitea-1.8.0-rc2 appears to perform a syscall (syscall_0x101cc) which seems to be unknown to strace here.

If i can help to gather additional information, please let me know.

@KillerLink commented on GitHub (Mar 30, 2019): I have the same issue. gitea-1.7.3 is running, neither gitea-1.8.0-rc1 nor gitea-1.8.0-rc2 are. I have tried to investigate a little, here are my current findings: -> According to gdb, it segfaults before the main function -> According to strace on gitea-1.8.0-rc2, it looks like a system call might be the problem: ``` execve("./gitea-1.8.0-rc2-linux-arm-7", ["./gitea-1.8.0-rc2-linux-arm-7"], 0xbe974740 /* 19 vars */) = 0 syscall_0x101cc(0x1fb0d6, 0x5f, 0x1, 0xff8b44, 0x101c4, 0xfe15bd) = -1 (errno 38) --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0xffffffd8} --- +++ killed by SIGSEGV +++ Segmentation fault ``` compared to the first 4 lines of strace on gitea-1.7.3 (which is working): ``` execve("./gitea-1.7.3-linux-arm-7", ["./gitea-1.7.3-linux-arm-7"], 0xbec84740 /* 19 vars */) = 0 uname({sysname="Linux", nodename="odroid", ...}) = 0 brk(NULL) = 0x2b50000 brk(0x2b50d0c) = 0x2b50d0c ``` Note that gitea-1.8.0-rc2 appears to perform a syscall (`syscall_0x101cc`) which seems to be unknown to strace here. If i can help to gather additional information, please let me know.
Author
Owner

@sapk commented on GitHub (Mar 30, 2019):

Can you try to run the latest 1.7 binary (https://github.com/go-gitea/gitea/releases/tag/v1.7.5) ?
The goal is to know if it is related to the build chain or a change in 1.8 version.

@sapk commented on GitHub (Mar 30, 2019): Can you try to run the latest 1.7 binary (https://github.com/go-gitea/gitea/releases/tag/v1.7.5) ? The goal is to know if it is related to the build chain or a change in 1.8 version.
Author
Owner

@KillerLink commented on GitHub (Mar 30, 2019):

I just tried, 1.7.5 runs fine for me.

@KillerLink commented on GitHub (Mar 30, 2019): I just tried, 1.7.5 runs fine for me.
Author
Owner

@KillerLink commented on GitHub (Apr 16, 2019):

Providing an update to the current situation:
The downloadable version 1.7.6 is working as expected.
The downloadable version 1.8.0-rc3 is still segfaulting.

@KillerLink commented on GitHub (Apr 16, 2019): Providing an update to the current situation: The downloadable version 1.7.6 is working as expected. The downloadable version 1.8.0-rc3 is still segfaulting.
Author
Owner

@ChrisB85 commented on GitHub (Apr 30, 2019):

Are there any news about that issue?

@ChrisB85 commented on GitHub (Apr 30, 2019): Are there any news about that issue?
Author
Owner

@zeripath commented on GitHub (May 2, 2019):

There's a workaround of using the arm6 binary.

We think the issue is either: something to do with the glibc version used on our xgo branch or possibly some incompatibility between the arm 7 GCC used on our xgo fork and raspbian.

It's weird and debugging it is going to be a several hour job replicating the build environments I suspect.

@zeripath commented on GitHub (May 2, 2019): There's a workaround of using the arm6 binary. We think the issue is either: something to do with the glibc version used on our xgo branch or possibly some incompatibility between the arm 7 GCC used on our xgo fork and raspbian. It's weird and debugging it is going to be a several hour job replicating the build environments I suspect.
Author
Owner

@KillerLink commented on GitHub (May 10, 2019):

Update on version 1.8.1: still segfaulting.
Also there is a duplication of this issue (https://github.com/go-gitea/gitea/issues/6700), which is newer but has a more accurate title than this issue.

@KillerLink commented on GitHub (May 10, 2019): Update on version 1.8.1: still segfaulting. Also there is a duplication of this issue (https://github.com/go-gitea/gitea/issues/6700), which is newer but has a more accurate title than this issue.
Author
Owner

@zeripath commented on GitHub (May 10, 2019):

I think I'll mark this as duplicate then and close this one.

For anyone wanting to run Gitea on a pi who finds this issue in future: Try the arm6 build.

@zeripath commented on GitHub (May 10, 2019): I think I'll mark this as duplicate then and close this one. For anyone wanting to run Gitea on a pi who finds this issue in future: Try the arm6 build.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3068