# git-submodule nested subrepo bug (Segmentation fault)

3 messages from 2013-05-20 to 2013-05-22. Participants: Kirill Berezin, John Keeping.
Thread: https://gitlist.dev/t/33875

## Kirill Berezin, 2013-05-20 05:32

Subject: git-submodule nested subrepo bug (Segmentation fault)
Message-ID: <CAAObgf9RNyVOYD00ki347KBqMWoFA3U7-YM3DnLK4yu62SozSQ@mail.gmail.com>
URL: https://gitlist.dev/e/CAAObgf9RNyVOYD00ki347KBqMWoFA3U7-YM3DnLK4yu62SozSQ%40mail.gmail.com

```
When you trying to add submodule, that already has submodule, it craches.
For example you could try: git clone --recursive
http://github.com/Exsul/al_server

Its happens because git dont create `modules` directory.
al_server/.git/modules


Workaround for it wont work to:
git submodule update --init
It init only first level of subrepos.
When you do:
cd chat
git submodule update --init
It crashes cause missed `modules` directory for submodule:
al_server/.git/modules/chat/modules

Final workaround is create this directory and try last command again.

```

## John Keeping, 2013-05-20 10:29

Subject: Re: git-submodule nested subrepo bug (Segmentation fault)
Message-ID: <20130520102925.GM27005@serenity.lan>
URL: https://gitlist.dev/e/20130520102925.GM27005%40serenity.lan
In-Reply-To: <CAAObgf9RNyVOYD00ki347KBqMWoFA3U7-YM3DnLK4yu62SozSQ@mail.gmail.com>

```
On Mon, May 20, 2013 at 09:32:21AM +0400, Kirill Berezin wrote:
> When you trying to add submodule, that already has submodule, it craches.
> For example you could try: git clone --recursive
> http://github.com/Exsul/al_server

Which version of Git were you using?  I was not able to reproduce this
with 1.8.3-rc3.

```

## Kirill Berezin, 2013-05-22 20:03

Subject: Re: git-submodule nested subrepo bug (Segmentation fault)
Message-ID: <CAAObgf-2sVPi=vRdv+NvQLSyxmwETEmdLJhfX6=1MCrrJ9DwWg@mail.gmail.com>
URL: https://gitlist.dev/e/CAAObgf-2sVPi%3DvRdv%2BNvQLSyxmwETEmdLJhfX6%3D1MCrrJ9DwWg%40mail.gmail.com
In-Reply-To: <20130520102925.GM27005@serenity.lan>

```
Ok, version is: 1.8.1.msysgit.1
Segmentation fault at the git clone --recursive
http://github.com/Exsul/al_server
0 [main] mkdir 6596 open_stackdumpfile: Dumping stack trace to
mkdir.exe.stackdump
C:\Users\....\libexec\git-core\git-submodule: line 181: 6596
Segmentation fault (core dumped) mkdir -p "$ditdir_base"
fatal: Could not switch to 's:/USER/..../al_server/.git/modules/': No
such file or directory
Clone of 'https://.../Exsul/chat.git' into submodule path 'chat' failed

2013/5/20 John Keeping <john@keeping.me.uk>:
> On Mon, May 20, 2013 at 09:32:21AM +0400, Kirill Berezin wrote:
>> When you trying to add submodule, that already has submodule, it craches.
>> For example you could try: git clone --recursive
>> http://github.com/Exsul/al_server
>
> Which version of Git were you using?  I was not able to reproduce this
> with 1.8.3-rc3.

```
